Hi I’m currently trying to get a state label to change the color inside a picture element
Have tried multiple different solutions from the forum, with no success
Does anyone have any suggestions?
Have tried the logic in the Template editor, and it works there
The color just stays white no matter what the output of the if statement
- type: state-label
entity: sensor.floor_thermostat_air_temperature_2
tap_action:
action: navigate
navigation_path: /heat-living-room
style:
color: |-
{% if state_attr('climate.floor_thermostat_6', 'hvac_action') ==
"heating" %}
red
{% else %}
green
{% endif %}
top: 50%
left: 75%