Hi everyone, I really need some help figuring out why my helper does not work. This is my Situation:
I have a rain gauge, that sends a steadily increasing rain_total value via MQTT. I want to create a helper based on that value, that shows if it is currently raining or not to use it in automations (closing roof windows, etc.). I figured a template should work and testing the template in the developer tools worked well. However, when using this template within a helper, it never updates and is therefore useless. The helper was created via the UI. What am I doing wrong?
Thanks for your help!
Btw, this is my template:
“{{ as_timestamp(now()) - as_timestamp(states.sensor.schou_72543_53632_rain_total.last_changed) < 300 }}”
But what happens when you reload the integration to the rain meeter or restart HA.
Will it update the value?
Just thinking if that is a loop hole that will cause automations to run
I didn’t mean the binary sensor should start working because of a restart.
I mean will the states.sensor.schou_72543_53632_rain_total.last_changed value change.
This could cause the binary sensor to go on.
You need to try what Tom suggested then and see how that reacts to a restart when it’s not raining.
Or perhaps you need to add to the existing template something with HA uptime. But I guess a integration reload will also cause issues, but that perhaps doesn’t happen as often.
Or try a triggered binary sensor that compares this value with the previous value