Greetings. Our current template(s) cards are configured to change color based on input values/thresholds against a reported/current temperature/humidity value, but sometimes it shows properly and sometimes it doesnāt:
You can see above that 1) Input Number 2) States match yet the condition for ātempminā is incorrectly shown on Template Card; see piece of code below:
...
icon_color: |-
{% set state=states('sensor.sensorX_temperature') %}
{% if state>=states('input_number.sensorX_tempmax') %}
red
{% elif state<=states('input_number.sensorX_tempmin') %}
purple
{% else %}
green
{% endif %}
...
Weāve tried various things and nothing seems to work; what are we missing here? Fun facts: if we āraiseā the ātempminā threshold to ~60, it turns greenā¦ also, some negative values turns the icon green, some redā¦ last piece of info: the ānotifyā service does correctly notify (or not) based on values, so even when the iconās color is incorrect, we get/not correctly the notificationsā¦ Thanks.