I am trying to set up a PLEG action triggered by a light switch that is turned on/off/on in a relatively short time.
-Whenever the on/off/on sequence is activated, start or restart a timer (nominal expiration 30 mins), then Start Garage Fan, turn off after 3 minutes
-If the door opens when this timer is activated, then Start Garage Fan, turn off after 3 minutes
I would appreciate any comments on my configuration, and tips on how to modify the trigger so that the timer is activated by on/off/on, rather than just when turned on.
Triggers
Name Description State Last True Last False
Door Whenever Zone #15 - Garage Do detects motion whether is armed or disarmed true 2018-03-25 18:19:24.230 0
lightoff Whenever the Garage Counter is turned off false 2018-03-25 18:09:32.303 2018-03-25 18:15:42.233
lighton Whenever the Garage Counter is turned on true 2018-03-25 18:15:42.233 2018-03-25 18:09:32.302
Conditions
Name Options Logic Expression Value Last True (or Last Change) Last False (or Previous Change)
Activated (lighton; lightoff; lighton) false 2018-03-25 16:47:41.906 2018-03-25 18:09:23.131
Gofan (Activated and Door) false 0 0
Actions
Name When Defined Actions
Activated Condition is True Immediate - 1; Delay 10 - 1; Delay 45:00 - 0
Gofan Condition is True Immediate - 1; Delay 03:00 - 1
Action: Activated
Device Actions:
Immediate
Device Action Arguments
Garage Fan 0318[267] SetTarget newTargetValue=1
Delay 10
Device Action Arguments
Garage Fan 0318[267] SetTarget newTargetValue=0
Delay 45:00
Device Action Arguments
Action: Gofan
Device Actions:
Immediate
Device Action Arguments
Garage Fan 0318[267] SetTarget newTargetValue=1
Delay 03:00
Device Action Arguments
Garage Fan 0318[267] SetTarget newTargetValue=0
Referenced Devices
Name Type
Zone #15 - Garage Do[229] MotionSensor1
Garage Counter[266] BinaryLight1
Garage Fan 0318[267] BinaryLight1
PLEG Test - Gar Fan[284] ProgramLogicEG
Edit: clarity