Two motion lighting feature requests: cancel previous light timers; restore previous state

Two features I would find useful:

First, cancel other rules' timers for lights. This is the problematic scenario:

At time 0, a first rule turns on light A with motion, 5 minute timeout.
A minute later, a second rule responds to another motion detector to turn on lights A, B, and C with a 30 minute timeout.
At 5 minutes, light A turns off. (No more motion at the first sensor)

That's not what I want--I want the "newer" rule to override the earlier one, and keep light A (along with B and C) on for 30 minutes. A way to cancel previous motion rules for specified lights would be helpful. Using "additional motion sensors to keep lights on" reduces the issue, but doesn't completely fix it if motion isn't continuing at the second sensor.

A second request (I realize that others have requested this) would be an option to return lights to the previous state after motion times out, rather than turn them off. I know this can be done with RM, but it would be simpler if it were an option in Motion Lighting.

Deleted my post. Upon reading yours again I realise you already knew about what I said.

The way I have been doing this for years in Motion Lighting, is by tagging along a virtual switch to disable the running instance. First rule is disabled by virtual switch A that is turned on when second rule is triggered, and second rule is disabled by virtual switch B when third rule fires.

Motion Lighting is pretty much feature complete. There are too many options in the app already that push the app well beyond its purpose. For more complex cases, there is Rule Machine, as you mentioned.

1 Like

Thanks for this! I'll give it a try. (Although, at the risk of asking for another feature, this is where I wish it were possible to select more than one switch to disable turning off, since I'm already using another virtual switch in all of my motion lighting rules.)

1 Like

There is more than one way to disable the rule, maybe you could use a virtual contact, instead :wink: or a button for that matter...

Going back to the restore previous status issue, I may have spoken too soon about being able to do it in RM. This is my approach, but if there is recurrent motion during the 5 minute timeout, the rule re-fires and the status is recaptured (overwriting what was truly the pre-rule status):

motion triggers rule
capture light status
wait for motion inactive
wait for 5 minutes
restore light status

Other than increasing the inherent timeout of the motion sensor (which would create other problems--I'm really using multiple sensors that also trigger other rules with shorter timeouts), how can I make this work?

Well maybe you could add a virtual switch to your devices and wait for the virtual switch to change to off (rather than wait for time) before restoring. Then you just have to make whatever situation you'd like the lights restored set that switch to off, having set it to on with the original situation that triggered the rule.

I was going to say you could even set the switch to off manually if you wanted to end it sooner but if you'd failed to wait for the motion inactive the rest of the rule would be waiting forever

Thanks. The virtual switch could work. I think I found another approach using a private boolean. Here is my actual rule (the switch names reflect Philips Hue scene activators in CoCoHue):

2 Likes