# Need help with a Rule

I have a rule that goes like this:
when motion detected in room 1
pause 12 sec
turn on a light at 15% in room 2
This works

What happens is that when you leave room 2 it trips the motion again and the light in room 1 comes back on 12 sec later!
I have tried everything I can think of to delay the tripping of the motion so you can get out out of room 1.
Any ideas on how to make this work? thanks

Do you have another rule that turns light 1 on? You haven't mentioned it being turned on above.
I f so, you might be able to pause the rule that turns light 1 on for a short period after light 2 turns on.

The motion detector is in room 1 and the light I am turning on is in room 2, no lights in room 1. The light in room 2 is normally off until the motion detector in room 1 trips.

Sorry. I'm a bit confused as you say its light 1 that comes on.

There is only 1 light. Maybe I can explain this way. Room 1 is the master bedroom and room 2 is the master bath. The light I am turning on is in the master bath. So you walk across the master BR and enter the master bath. When the motion detector trips in the master bedroom you have about 12 sec before the light in the master bath turns on to 15%. The reason for the 12 sec is do to the place where I had to put the motion detector.
But, you have to pass by the motion sensor again to get across the master BR to the bed. Meanwhile it trips again and the light comes back on in 12 sec in the master bath.

Ah OK. With you now. Hmm.
@bangali's room manager may do this for you.
Personally I've never used it but it may be the answer.

1 Like

Thanks, I will check that out. I wonder if setting some sort of virtual device would be a way.

Looking at rooms manager it looks incredibly complicated for doing something that should be so simple. I will have a think......

Yes I agree. It looks like it would be way too complicated for such a simple task. I wonder if changing around the conditions would help.

Add a new trigger, when your master bath switch turns off, set Private Boolean false for your original rule, then set it back to true after 1 minute or so. Then go back to your original rule and turn on the Enable/Disable with Private Boolean restriction.

This will prevent your original rule from firing again for 1 minute after the master bathroom light turns off.

If motion is active and Light is off = turn on virtual switch and light at 15%
If motion is active and virtual switch is ON = turn off light and and turn off virtual switch with delay time to accommodate for the motion sensor.
I guess it's similar to @destructure00

I was then going to ask the question, how long a delay do you want before the motion sensor state (i.e. before it can be evaluated again) becomes 'active' again.

Is this 2 separate rules, because I cannot figure out a way to do it with one.

I am not quite getting my head around this one yet. Do you have an example?

I'm at work without access to my hub. Will post something when I get home later if nobody else beats me to it.

Ok, great. Thanks for the help.

I think @destructure00 is saying this.
Brand new rule.

SELECT TRIGGER EVENTS
Bathroom Lights Off

SELECT ACTIONS
Set Rule Boolean to True. Delay by 1 minute.
Select the rule that you already have.
Set Rule Boolean to False.
Select the rule that you already have.

IN THE RULE YOU HAVE.
Scroll to the bottom and open restrictions.
At the very bottom toggle the switch Enable/Disable with private Boolean to 'ON'.

This way your original rule will be disabled for 1 minute.

1 Like

Here is what I have tried so far. It works except for the dimming. Bulbs don't go down to 15%.

This rule is called "Bathroom Light On at 15%"
Conditions:
MB Motion is Active
M Bath light is off
M Bath virtual is off

Action if True:
Delay by 12 seconds
turn on M Bath Virtual
Dim M Bath Light to 15% (this where it asks for a value between 0 and 100, I put 15)

This rule is called "Turn Off M Bath Light on Leaving"
Conditions:
MB Motion is Active
M Bath Virtual on

Actions for True:
turn off M Bath Light
turn off M Bath Virtual after 1 min

Is this correct?
Why isn't the dim working? thanks

Going from memory here since I'm not home, but I believe you need to Set Level, not Dim.

Ok, I have this part you gave me set up but where does the motion come in?