This used to work to change icon color, but it no longer does as of latest HA update.
What am I doing wrong?
Thanks.
- type: entity
entity: sensor.room_state
attribute: motion
name: Motion
card_mod:
style: |
:host {
--card-mod-icon-color: {{ 'gold' if state_attr('sensor.room_state', 'motion') == 'on' else 'var(--paper-item-icon-color)' }};
}
icon: mdi:motion-sensor