Node-RED nodes for hubitat

If you decide you want to use resettable delays in turning off the light, I would suggest using this one:

Then you can reset the off timer based on additional motion like:

Note that with multiple motion triggers it can be tricky, depending on how the sensors react to continuous motion. If some stay "active" the whole time motion is present, and others don't, then you will need more logic to check if any=active before triggering the delayed off.

As yours appear to all be the same type (Xiaomi) you might not have to worry about that.

If you did, you would just daisy chain the motion sensors in the "off" path (making sure to DEselect send events in the node config) like this - basically the msg would never reach the stoptimer node if all nodes aren't = "inactive":

Some would say "that's a lot of nodes for something simple". My counter to that is I would rather explicitly see the msg flow than to bury the logic in a function node that makes the flow sheet "prettier" but hides the logic/flow control.

While I could easily do it this way, I don't find this useful in the long run:

2 Likes