Suggestions for time related rules

Trying to figure out how to do this in HE

  1. If motion detected in lounge, spray air freshener by turning on zwave plug for 1 minute, but only do this a maximum of once per hour.

  2. If backdoor open for more than 10 minutes set variable SUMMERMODE=TRUE, This disables central heating. I’ll setup a button/echo command to re-enable heating.

I just can’t get my head around the timings in HE

Any suggestions most welcome

I'd suggest making a virtual switch or using a local variable (I prefer VS since you can check their state and flip it if desired easily)
Trigger: motion lounge
Rule:
If VS Freshness is off then
Cancel delayed actions
Turn on ZWave Plug
Turn off ZWave Plug delay 1 minute
Turn off VS Freshness delay 1 hour cancelable
End if

1 Like

For your second situation...

Trigger: Door contact sensor changed
Actions:
IF sensor is closed, exit rule (simple conditional)
Wait: 10 minutes.
IF sensor is open, set variable SUMMERMODE to TRUE. (also a simple conditional)

EDIT: You could probably also use the sensor OPEN state as the trigger and eliminate the first conditional...

1 Like