Changed icon of a view based on a state

Hello everyone,

I am searching for a way to change the icon of a view based on a device state.

I tried this:

  - title: Home
    icon: |
      {% if is_state('cover.WohnzimmerJalKueche', 'closed') %}
      {% else %} 
      {% endif %}

But unfortunately it is a blank space instead of an icon.

Can anybody help, please?

Templates cannot be used here.
The only way is using card-mod-theme.
Go to card-mo thread - 1st post - link at the bottom - “themes” section - customizing tabs on the toolbar.

1 Like