Run a flow only once within a specific time frame

I have linked my Paradox alarm successfully to be able to use Node-Red. What I am trying to achieve is to have the motion detection to trigger the alarm to “Stay Arm” between a specific time frame (in my case 21:50 - 22:10). So when the motion detector is triggered it sets the alarm and send a “announcement” to my Alexa device saying that the system is armed in Stay Arm.

The problem I have now is that every time that sensor gets triggered it arms the system again and send an "announcement " again - very annoying :slight_smile:

So my thought is to have a state node to check if the alarm is off then to trigger the node to set the alarm, if the alarm state is on then do nothing?

Can I achieve this? this is the current setup whereby it keeps arming the system when the sensor is triggered.

Hope I made sense of what I am trying to achieve?

Thanks

Use a delay node to limit the amount of messages per amount of time:
image

Thanks, I have tried what you suggested but could get it right :frowning: So what I then tried was the following:

The “Wait For” Time is set longer than the time frame specified in the “Time Range” node.

Not sure if it is the correct way, but I tested it over the weekend and is working perfectly :slight_smile:

Thanks

If it works :+1:… it works :joy: