13
Resetting Timers
(lemmy.tf)
Home Assistant is open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server. Available for free at home-assistant.io
In NodeRED it would look like this:
The top row is triggered when the motion detector changes to "on". It turns the lights on without delay.
The second row only triggers if the motion detector has been "off" for 5 minutes. If it goes back to "on" within those 5 minutes, the timer starts over automatically.
You can try importing it using the following code:
NodeRED code dropdown
Do NodeRED timers survive a restart?
When I restart mine, I restart HA only, and all of the add-ons (including NodeRED) keep running. The problem is as soon as HA restarts, it blasts all of the states to NodeRED, and for the most part (I think), they all go from "unavailable" to "on/off". This restarts whatever timers NodeRED keeps track of. I don't know of a good way around this, but I restart HA so infrequently that it doesn't matter for me.
No, but you CAN use HA timers in NodeRED. You just have to trigger off the state of the timer itself. I did get it to work but it was quite a bit of spaghetti, I found it easier to use eventID triggers in the standard automation GUI for dealing with persistent timers.