When does a trigger's condition get evaluated?

Posted on
Mon May 22, 2017 12:28 pm
johnfdl offline
Posts: 177
Joined: May 18, 2017
Location: Atlanta, GA USA

When does a trigger's condition get evaluated?

I am creating a trigger to auto-close my garage door. I have a variable called Autoclose which allows me to override the auto-close (if I am working in the garage for example). My question is are the conditions evaluated at trigger time or at action time? I ask this because I have the actions set to a 2 min delay (so I can clear the garage area). So if I open the garage door and 1 min later, set the GargeAutoclose variable to OFF, then will the condition which evaluates the variable be seen as ON or OFF?

Trigger
Image
Conditions
Image
Actions:
Image
Last edited by johnfdl on Mon May 22, 2017 1:33 pm, edited 3 times in total.

Posted on
Mon May 22, 2017 1:01 pm
johnpolasek offline
Posts: 911
Joined: Aug 05, 2011
Location: Aggieland, Texas

Re: When does

I believe they are evaluated at trigger time; however, what you can do is have another trigger that when the cancelautoclose variable becomes true, removes delayed actions from the autoclose trigger.

Posted on
Mon May 22, 2017 1:31 pm
johnfdl offline
Posts: 177
Joined: May 18, 2017
Location: Atlanta, GA USA

Re: When does

Thanks. So to be clear, the "remove delayed actions" function.....does this simply skip the delayed action (preserving it for the next time the trigger is fired) or does it physically remove the delayed action? I am assuming the former, but the name makes me think it would eliminate it permanently (though it would be difficult to think of a use case for that)..

Posted on
Mon May 22, 2017 1:56 pm
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: When does a trigger's condition get evaluated?

When a delayed action executes (at trigger/schedule time), Indigo creates a special schedule action which will actually perform the action at the correct time (and delete itself when done) - you can see them in the UI starting with "_delay". When you remove delayed actions, that's what gets deleted. The delay specification (i.e. the description of when the action should actually occur) on the action remains intact.

Conditions are (as pointed out above) evaluated at trigger/schedule time.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon May 22, 2017 1:59 pm
johnfdl offline
Posts: 177
Joined: May 18, 2017
Location: Atlanta, GA USA

Re: When does a trigger's condition get evaluated?

Thanks Jay.....that makes sense and sounds like it will address my needs for this scenario.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests

cron