Hi Guys, I have a sensor that a random intervals stop working and Home Assistant reports state “unknown”. I can send a reboot, which solves the problem, but in order to automate it I must detect when the sensor reports “unknown”. There is a side problem, because if I print the state with “states.potencia_ac.state”, it reports “Desconocido” ( I am spanish).
I am trying a template lik the following one , but it does not work
{% if is_state("sensor.potencia_ac", "unknown") %}
Roto
{% else %}
no roto
{% endif %}
It seems that this trigger works; I’ve configured it to send a notification instead of the reboot, and if I change manually the state to ‘unknown’ in the states tool, the message is sent.
Thanks a lot.
eHc