Trigger once a day in NR


I have a Trigger State Node that I want to return true but only once a day ( so if it triggers at 8am then it should not re-attempt the evaluation again until just after midnight) otherwise its ends up executing the flow multiple times which I do not want.

What’s the best way to implement this intention?

Use flow variable. Set it to false every midnight and on system start (if not set)
Then in you actual flow, at beginning check the flow variable and proceed only if it’s not true. then immediately set it to true and follow with your functionality

For better reliability configure your NR to provide flow variables being materialized in storage. this way they can survive system restart.

1 Like

smart. I like nodes which provide clean solutions. But I doubt state of this node survives restart

It doesn’t

@monkeydust If you are worried about restarts, you can always check the “Expose to Home Assistant” feature under you event state node in order to create a switch in HA.

then you can turn off that switch whenever the node triggers, thus turning itself off.

As maxym suggested, then create another flow that turns on that switch every day at midnight.

That will survive restarts

The throttle is more useful for shorter timespans, as maxym pointed out.

I would suggest to use an easy input boolean in HA to record the status and then flip it at midnight as suggested with the switch above.