If you want to do it entirely in nodered your could do this:
[{"id":"59909777.6b7488","type":"inject","z":"d59703d6.87ebf","name":"Coming Home","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":160,"y":4240,"wires":[["5e92ceaa.01ff7"]]},{"id":"5e92ceaa.01ff7","type":"traffic","z":"d59703d6.87ebf","name":"","property_allow":"payload","filter_allow":"on","ignore_case_allow":false,"negate_allow":false,"send_allow":false,"property_stop":"payload","filter_stop":"off","ignore_case_stop":false,"negate_stop":false,"send_stop":false,"default_start":true,"differ":false,"x":370,"y":4240,"wires":[["209996dd.77f58a"]]},{"id":"209996dd.77f58a","type":"debug","z":"d59703d6.87ebf","name":"Do stuff","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":560,"y":4240,"wires":[]},{"id":"27b8ab7.9d42554","type":"inject","z":"d59703d6.87ebf","name":"Leaving Home","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":170,"y":4120,"wires":[["e57a2f76.d915b","78c7d033.61a3"]]},{"id":"6117a4c4.4c09ac","type":"debug","z":"d59703d6.87ebf","name":"Do stuff","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":520,"y":4120,"wires":[]},{"id":"e57a2f76.d915b","type":"change","z":"d59703d6.87ebf","name":"Block","rules":[{"t":"set","p":"payload","pt":"msg","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":4120,"wires":[["6117a4c4.4c09ac","5e92ceaa.01ff7"]]},{"id":"52d74d3b.50d034","type":"change","z":"d59703d6.87ebf","name":"Allow","rules":[{"t":"set","p":"payload","pt":"msg","to":"on","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":250,"y":4180,"wires":[["5e92ceaa.01ff7"]]},{"id":"78c7d033.61a3","type":"delay","z":"d59703d6.87ebf","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":120,"y":4180,"wires":[["52d74d3b.50d034"]]}]
If have set the delay at 10 second just to show… The trick is the “Traffic light” node. Add this to your palette.
GV