Was the door open for the last 2 seconds?

Hey

I use a automation in node red to get a notification if some one is in my front yard.

The Problem I get the message everytime - also if I’m leaving the house.

So my Idea was a simple door Sensor - but the Sensor is way quicker then my Blue Iris and deepstack setup.
If I’m leaving quick the door Sensor is on off again and my automation hits.

So how can I put something between and check if the door was open?

Greetings

Make a Boolean helper in HA.
Then when your sensor is activated set the helper to true and make either a delay or merge node with the timeout you want followed by a node that set the helper to false.
Now you just need to check the helper in your original flow.

The difference between a delay node and a merge node is that a delay node will continue after the set time regardæesw of what happens.
A merge node will continue after a set time after last triggering, which means any new messages during the timeout will reset the timer.

1 Like