I am using an events state node and two subsiquent current state nodes (both binary sensors) to trigger a couple of call sevices.
It is generally all working but the issue I am having is that the entity for the events state node takes a couple of minutes to change to its state compared to real life which then means that the entities for the current state nodes can have changed their state and I get the wrong notification. Is it possible to check if the binary sensors has been triggered in the 3 mins before the events state was triggered with either the current state node or any other?
Welcome!
Without seeing your flows & code, I am guessing that you could simplify by replacing your events: state
and current state
nodes with a trigger: state
Edit: you can also store the state and time (when the trigger occurs) by using a context store.
See also:
https://zachowj.github.io/node-red-contrib-home-assistant-websocket/node/get-history.html
1 Like
Thanks for your help.
I ended up replacing the current state node with with the get history that looks back 5 minutes. Then I’ve used a switch node to direct it to the right call service. So far it all seems to be working perfectly.