diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index 7db7427b0..3617b7a0b 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -6852,13 +6852,15 @@ action: data: component: '{{ repeat.item.page }}.{{ repeat.item.component }}_icon' message: > - {% if repeat.item.icon is string %} + {% if repeat.item.icon is string and repeat.item.icon | length > 0 %} {{ all_icons[repeat.item.icon.split(":")[1]] | default(all_icons.unknown) if repeat.item.icon.split(":") | count > 0 else repeat.item.icon }} - {% else %}{{ all_icons.unknown }} + {% elif state_attr(repeat.item.entity, "icon") | default("") not in ["unavailable", "unknown", "", None] %} + {{ all_icons[state_attr(repeat.item.entity, "icon").split(":")[1]] | default(all_icons.unknown) }} + {% else %}{{ all_icons.blank }} {% endif %} continue_on_error: true - variables: