Solved - Temperature automation not work

I have a temperature sensor and a pump that i want to start and stop if the temperature is over or under a temperatur.

If you see the screenshot i have set up rules, but it will not run. it seems like that the “multi sensor” not report the right number.


Skjermbilde 2021-12-13 kl. 12.18.13
Skjermbilde 2021-12-13 kl. 12.22.40
Skjermbilde 2021-12-13 kl. 12.22.56

The automation will only fire if the temperature crosses one of those thresholds. It will not fire if you restart (or reload automations) and the sensor is already between those values.

The automation is in automations.yaml and sharing the code helps us help you.

However, that will trigger when the value goes from 1 or lower, or 80 or higher, to between 1 and 80. If it is already between 1 and 80 it will not trigger.

If you want it to run when HA starts/you reload automations then you’ll need to add triggers for the reload and startup, as well as check the number in a condition.

1 Like

I did figure out this. I had to use Call Service instead of Numeric state. Then it did work.
Thanks for help