I have an automation for bedtime that turns off the downstairs and turns on the bedroom. This works fine if we go to bed at the same time. If not, its a problem. Is there a way to prevent turning on if turned off in the last hour similar to the motion lighting option of Do not turn on if manually turned off?
My thinking is two pronged on this:
- You'll need to employ the "Private Boolean" mechanism within the existing rule;
- And, you'll need a new second rule to govern the first.
FIRST RULE
Add as a "Required Expression" ► Private Boolean == TRUE
SECOND RULE
Trigger ► Switch == turned OFF
Actions ► SET Private Boolean of Rule #1 to FALSE ► WAIT 60 minutes ► SET Private Boolean of Rule #1 to TRUE
Make sense? Hope I'm answering what you asked.
Thank you. I figured it might be a two step process but I wanted to confirm.
Rule Machine has a condition Time Since Event. You specify a timeframe, and it is true if it's been longer than that, and false otherwise. You could use this in a single rule to know whether or not to turn on. Like this:
The next release (2.3.1) will allow the specific event of switch-off to be in that Time Since Event condition, so the test for it being off won't be needed then.