New rule doesn't work. Can't figure out why

Backstory. Motion lighting app no longer shirts off my bathroom light after motion stops. Recreated, no good. It doesn't seem to schedule the event even though devices report correctly.

Creating rule in RM, it triggers, lights turn on, triggers after no motion but nothing happens. Any body see what's wrong here?

When you are testing it, is the toilet contact sensor open or closed? In the closed case, it waits for it to open, but doesn't turn on the light after.

The contact should be open for the lights to go out. If it's closed the lights should stay on. The contact sensor is reversed from the toilet seat. If it isn't triggered at all, shouldn't the other two ifs still function? I'm still not used to the new RM :slight_smile:

The rule will run when either motion sensor becomes inactive (or becomes active). If one motion sensor becomes inactive while the other one is still active, the first condition will happen and the light will turn on. If the light is already on, that won't be noticed. It is the second of the two becoming inactive that should trigger your desired action of turning off the lights, but only after a minute and if the contact sensor is open and if no other rule cancels it during the delay.

I guess I don't understand the second half, what you say makes sense and to me appears to be what the rule is doing. When the last active motion sensor goes inactive, the rule triggers again, and does the second else-if right? I realized the third one is redundant. So now it looks like this.

Do you understand the 'state hints' ?


The first (single letter) tells you the state of that condition, while the full word tells you the final evaluation.

You have (F)[FALSE] in the first IF.. so you know that it is NOT what's driving the result.

You have (T) and then another (T) plus the [TRUE] showing you that each of the two conditions is true, and that two T's make a TRUE, Thus it's going to Delay 1 min, then turn off the light. It's got a Cancelable Delay which is probably not what you want.. you can cancel the delay BUT 100% of the time the light will go off. You can make the delay shorter via cancel.

My guess is that you want the light to stay on for a minute, unless there's more motion.

To do that, delete the Delay and make the OFF have a cancelable delay.

Screen Shot 2020-04-22 at 8.12.14 PM

Thanks, I do understand the hints. And I think I get what you are saying. I've made the change and will test.

Appreciate the help from you both!

I don't know if this will help or not but when I create a new rule, I test it in pieces. First I setup the triggers with some some simple action. I use a Sengled bulb. Then once I know the triggers are doing what I want I test the rest.

1 Like

With regard to your multiple motion sensors, you need to pay attention to whether the condition uses "any" or "all". When one sensor is active and the other sensor is inactive, this distinction is important.

Out of curiosity, what are you sensing with your toilet contact sensor? Is this a reminder to put the seat down?

I've got that right I'm pretty sure, trigger is any, light on is any, light off is all inactive. It turned off on my wife this morning while she was blow drying her hair though.

I have toilet sensors so when the kids are on the toilet for a long time unmoving, the light doesn't shut off.

Yeah I'll break it down to one sensor for now, and add on.

Try something like this.

If master bath motion sensors any active or
toilet seat sensor closed then
On master bath light
Cancel delay
Delay 1 minute(cancelable)
Turn off master bath light

I forgot you should add the toilet sensor as another trigger.