I came here to seek for help because I am clueless at this point. I am using mushroom template card to display some statuses of open windows/door/lights/switches. Basically it changes icon and icon color based on if there is any entity from the domain open. Code is as follows:
square: false
type: grid
cards:
- type: custom:mushroom-template-card
primary: Dvere
secondary: >-
{{ states.binary_sensor | selectattr('state', 'eq', 'on') |
selectattr('attributes.device_class', 'eq', 'door') | list | count }}
icon: >-
{% if (states.binary_sensor | selectattr('state', 'eq', 'on') |
selectattr('attributes.device_class', 'eq', 'door') | list | count)
%}mdi:door-open{% else %}mdi:door-closed{% endif %}
multiline_secondary: false
icon_color: >-
{% if (states.binary_sensor | selectattr('state', 'eq', 'on') |
selectattr('attributes.device_class', 'eq', 'door') | list | count)
%}brown{% else %}inherit{% endif %}
tap_action:
action: navigate
navigation_path: /lovelace/otvorene-dvere
hold_action:
action: none
double_tap_action:
action: none
- type: custom:mushroom-template-card
primary: Okná
secondary: >-
{{ states.binary_sensor | selectattr('state', 'eq', 'on') |
selectattr('attributes.device_class', 'eq', 'window') | list | count }}
icon: >-
{% if (states.binary_sensor | selectattr('state', 'eq', 'on') |
selectattr('attributes.device_class', 'eq', 'window') | list | count)
%}mdi:window-open{% else %}mdi:window-closed{% endif %}
icon_color: >-
{% if (states.binary_sensor | selectattr('state', 'eq', 'on') |
selectattr('attributes.device_class', 'eq', 'window') | list | count)
%}blue{% else %}inherit{% endif %}
tap_action:
action: navigate
navigation_path: /lovelace/otvorene-okna
hold_action:
action: none
double_tap_action:
action: none
- type: custom:mushroom-template-card
primary: Svetlá
secondary: >-
{{ states.light | rejectattr('attributes.entity_id', 'defined') |
selectattr('state', 'eq', 'on') | list | count }}
icon: >-
{% if (states.light | rejectattr('attributes.entity_id', 'defined') |
selectattr('state', 'eq', 'on') | list | count) %}mdi:lightbulb{% else
%}mdi:lightbulb-outline{% endif %}
badge_color: ''
icon_color: >-
{% if (states.light | rejectattr('attributes.entity_id', 'defined') |
selectattr('state', 'eq', 'on') | list | count) %}yellow{% else
%}inherit{% endif %}
tap_action:
action: navigate
navigation_path: /lovelace/zapnute-svetla
hold_action:
confirmation:
text: Vypnúť všetky svetlá?
action: call-service
service: light.turn_off
target:
entity_id: all
double_tap_action:
action: none
- type: custom:mushroom-template-card
primary: Prepínače
secondary: >-
{{ states.switch | rejectattr('attributes.entity_id', 'defined') |
rejectattr("entity_id", "search", "termostat") | selectattr('state', 'eq',
'on') | list | count }}
icon: >-
{% if (states.switch | rejectattr('attributes.entity_id', 'defined')
|rejectattr("entity_id", "search", "termostat") | selectattr('state',
'eq', 'on') | list | count) %}mdi:toggle-switch{% else
%}mdi:toggle-switch-off{% endif %}
multiline_secondary: false
icon_color: >-
{% if (states.switch | rejectattr('attributes.entity_id', 'defined')
|rejectattr("entity_id", "search", "termostat") | selectattr('state',
'eq', 'on') | list | count) %}green{% else %}inherit{% endif %}
tap_action:
action: navigate
navigation_path: /lovelace/zapnute-prepinace
hold_action:
action: none
double_tap_action:
action: none
columns: 2
On one HA instance, this works perfectly. On other, icon for door and windows just won’t display.
Working one:

The one that’s not working:

Taking the first one (door) as example:
The template for icon renders in template editor as mdi:door-closed
if i manually put icon as mdi:door-closed, it is displayed

It is just the template output that does not display icon ever.
I tried putting the light template in the card for door, and it does display icon. Only door/window are not showing.
I have tried recreating the card from scratch, no luck.
I read about issue not displaying some icons after updating HA to 2024.2, and I followed all instructions - redownloaded Mushroom card, removing it completely, reinstalling, restarting HA, restarting host, clearing cache on cloudflare - none of this makes any difference.
On the instance where this is working - the setup is similar. Latest HA, latest HA OS version, latest mushroom card.
Even if I access HA locally (not via cloudflare), result is the same, which makes me believe that Cloudflare is not breaking it in any way.
Can anyone advise what could be causing this?