Stuggling a bit with something that seems simple.
I want my entity card to change "icon color" based on the state of the entity. Using "Developer tools" I have confirmed that the entity is lock.back_door_lock and has two states: locked and unlocked.
what am I doing wrong?
type: custom:mushroom-entity-card
entity: lock.back_door_lock
primary_info: state
secondary_info: last-changed
tap_action:
action: toggle
hold_action:
action: more-info
icon_color: |
{% if is_state('lock.back_door_lock', 'locked') %}
green
{% else %}
red
{% endif %}
the icon is showing no color as if it is disabled. I believe this is possible based on posts here:
https://github.com/piitaya/lovelace-mushroom/issues/335