Node for block between time


i motion sensors for my Lightsystem Hue. In the floor and Kitchen are motion sensors. They react and switch on and off the light. I use Switches for my Rooms too. The Flow disable the motion sensors by click "on, dim up and down" and enable the Sensors by click "off".

Now i want to block this commands and disable the sensors between 7AM and 20PM for example, while the rooms are bright enough.

The Dimmer Switch sends " = on, off, dim up, dim down
I simply add a switch with this options and the second switch delete all and add a boolean false or true to msg.payload to the sensors.

May you have any Node or similar to solve this? Timecheck node is not good enough. other time nodes are only start a flow. i dont know how i can solve it with functions.


Have a look at node-red-contrib-simple-gate, that can be used to block or allow through messages using a gating signal. You can use something like node-red-contrib-cron-plus (or a function node) to generate the pass/block signal.

1 Like


thank you it works with crons and injects.!

If you put a gate before the Switch node I think you would only need one.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.