Node Red help

I currently have a flow that sends a message notification to my phone when a door is open from a sensor on the door, I can get this notification any time of the day. This is sort of a 2 part problem 1st I like to stop the flow when its between a specific time of day, also later I’d like to set it up like an alarm. so when I arm the system it would enable the flow again if its out side the time to always monitor the sensor.
so in short how can I stop a flow based on the state of another entity?

You want to use the current state node.
I use an input boolean called “quiet hours”. I have a flow that turns it on/off based upon time triggers. I put a current state node between the trigger and the notify. You can do the same for the arm system.