diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index 9942dc0..decd7d6 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -2405,7 +2405,7 @@ variables: scene: "\U0000EE0B" #EE0B script: "\U0000F45D" #F45D switch: "\U0000E97D" #E97D - unknown: "\U00000E27" #E027 + unknown: "\U0000E027" #E027 weather: lightning: "\U0000E592" #E592 protect: "\U0000F05C" #F05C @@ -4435,7 +4435,12 @@ action: # BRIGHTNESS Font Color btn_bri_font: "{{ btn_txt_font }}" #"{{ nextion.colors.grey_dark }}" # ICON Value - btn_icon: "{{ repeat.item.icon if repeat.item.icon | length > 0 else nextion.icons.buttons[repeat.item.entity.split('.')[0] if repeat.item.entity else 'unknown'] }}" + btn_icon: > + {% if not current_entity_state_available %} {{ nextion.icons.buttons.unknown }} + {% elif repeat.item.icon | length > 0 %} {{ repeat.item.icon }} + {% elif repeat.item.entity and repeat.item.entity.split('.') | count > 1 %} {{ nextion.icons.buttons[repeat.item.entity.split('.')[0] if repeat.item.entity else 'unknown'] }} + {% else %} {{ nextion.icons.buttons.unknown }} + {% endif %} # LABEL Value btn_label: "{{ repeat.item.name }}" # BRIGHTNESS Value