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.
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
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
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...