Complex Motion/Light/Door rule

Hey crew! Looking for some collective wisdom here. the logic of a rule I want is not materializing for me.
My entry hallway has 3 Hue lights in the ceiling. I have a scene controller at each end (Zooz Zen 37) and an Aeotec Multisensor 6 just above the front door. Door also has a contact sensor from Ring.

Here's what I'm trying to do:
I have the SC's setup so button1 will toggle the lights on to 100% and set color as bright white.
I have button3 setup to toggle the lights on at 50% and set them red.

I created a basic rule that runs from Sunset to Midnight that says:
If front door opens, push button3 on the controller. Then wait for multisensor to report no motion for 3 minutes, Push button1 on the controller. This works fine.

I also created a rule that runs from sunset to 9PM that says If multisensor reports motion active, press button1 (toggles on) , then wait for multisensor to report no motion for >5 minutes and press button1 again (toggles off) This also works fine.

How do I keep them from stepping on each other?
Like if the lights are already on white, I don't want the red to fire if the door contact opens,
or
If the door opens, red fires, and then the motion goes active I don't want the red overriden to white. Actually what that would do currently is flip it to white and then turn off, because I've got button1 set to toggle.

Love some guidance/wisdom here. :slight_smile:

Add a Required Expression to both rules that the lights must be off. The first trigger will take priority and that Rule will be the active one until the lights turn off.

For this one, just modify the action in the rule:

Turn lights red
Wait for Event - Motion active
Turn lights white
Wait for Event - Motion inactive and stays 3 minutes
Push Button 1

Good idea. Trying that. Will know later today if it works :slight_smile: Thanks!

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