How to do motion lights with multiple conditions

Just got my Hub, I was going to say today, but since it now 2 AM I guess that was yesterday.

I'm trying to setup the following and can't seem to get it with either a rule or motion light.

I want motion in the hall to turn on specific lights to red and 10% but only if mode=Night and a set of other lights are all off, then turn off 15 minutes later.

I can setup a rule that gets the first part right but don't see a way to turn off 15 minutes later.

I can setup a motion light to turn them on based on motion and mode=night and off 15 minutes later but don't see how to have the condition that a set of other lights need to all be off.

What's the best way to pull this off?

2 Rules.
Rule Machine just loves company in the form of additional rules. :smiley: :smiley:

Seems like you have the two rules, you just have to have the truth of one become the start/enable/trigger for the second.

Rule Truth
Rule Actions

In a Rule Action, (Select Actions for True (or False)) look for: Set Rule Boolean, Run Rules, Rule Actions
In that section is what you need, I think.

I think you can do this in a single RM "Rule". Add to the False Action a Delayed 15 minute action to turn off the lights with CANCEL feature. This will keeps the lights on as long as there is a new motion event within the 15 minute delay and will reset the delay back to 15 minutes.


This is not exactly what you're looking for ... but I have in my master bath our master closet - when we walk into the master bath I flip on the lights and as long as there is no motion for 2 minutes I turn them off - any new motion resets the timer.

Now if we go into the closet and my wife spends 30 minutes looking for a top to wear that motion sensor will keep the main master bath lights on - even though she's not in the main part of the master bath. Again not exactly what you're looking for - but something that might help you.