Hey All,
Desired behavior: between 0800 and 2100, motion sensor trips, turns light on. Inactive motion sensor for 60 minutes, turn light off. (if motion active during the 60 mins, want it to restart the timer for turning off the light)
Between 2100 and 0800, no change to light regardless of motion sensor.
Here's what I setup:
The rule isn't waiting 60 minutes to turn off the light...or maybe it isn't cancelling a "turn off" command from 60 minutes ago. At any rate, I can fire the light with motion, then it'll turn right back off. Any tips? What does it mean if I set the delay to be "cancellable"?
Thanks
change the off delayed to be "off delayed cancelable"
and add a cancel delayed actions before the on command
ignore the "disable dining room switch stuff in the rule"
I have other rules that when the light switch is physically turned on or off set this virtual switch and use thise to disable this rule so that once you do that the light does not turn off.
In case you are interested in more than one option, hereās another one:
- Keep your predicate and trigger as is
- Between On and Off, add a wait for no motion with a 1 hour duration:
Actions:
On: Master bathroom light
Wait for rule: Master bathroom light inactive(T) [TRUE] --> duration: 1:00:00
Off: Master bathroom light
What this will do is start the rule once when motion is detected if the predicate is true.
Then once the light is on, it will wait for the motion to be inactive for 1 hour. If it activates before 1 hour, it will re-start its timer.
Once the 1 hour is reached, the light will turn off. This will happen regardless of your predicate.
1 Like
Thank you to both of you! I got it working with Sebastienās recommendation - seemed simpler.
Clarifying question: if I use a cancelable delay, do I have to have a cancel delayed actions action to make it cancel, or will rule machine cancel it if the conditions are no longer true?
Thanks
1 Like
You will need to use ācancel delayed actionsā to cancel a cancellable condition.