In Lovelace is it possible to show a temperature in a different color, based on the value (state). E.g.
- entity: sensor.synology_temperature_sda
attribute_templates:
state:
- label:
styles:
- color: >-
{% if states("sensor.synology_temperature_sda") > '40' %}
red
{% else %}
green
{% endif %}
above does not work, so I’m looking for the correct way to do this.
Thanks.