I have a custom mushroom chips card, and I’m trying to show the current temperature in the chip (which works), but change the icon colour depending on whether the heat is on or not (the states are ‘heat’ and ‘off’). I’ve used similar code elsewhere, but this one stubbornly stays white.
- type: entity
entity: sensor.master_bedroom_temperature
icon_color: |-
{% if is_state('climate.master_bedroom', 'heat') %}
orange
{% else %}
blue
{% endif %}