I need to display a temperature value and at the same time change the color based on a “light” sensor.
to understand each other
type: glance
entities:
- entity: light.sth001
color grey if "sensor.th_001_temperature ==off"
color green if "sensor.th_001_temperature ==on"
I couldn’t find anything online but I remember that I made something like this in the past with mod-card but I REMEMBER
- entity: sensor.th_001_temperature
card_mod:
style: |
:host {
--card-mod-icon-color:
{% if states(light.sth001) == 'off' %}
red
{% endif %}
green
}