Cancelling pending tasks during wait period

Hello everyone,

Like a lot of people, I am currently moving all the automations I had in Webcore to Shaptools. I am therefore pretty new to the Sharptools logic.

I have a standard setup where virtual switches control STHM. I control them from a tablet near the front door. When arming, I have setup a 60 seconds delay before a switch arms STHM and the door locks.

My problem is when I want to cancel the arming sequence during the exit delay or “wait pedriod” (e.g. I realize I forgot something inside after getting out). In Webcore, the Task Cancellation Policy allowed me to deal with that problem. When hitting the disarm button during the exit delay, my disarming automation would change the state of the arming switch and therefore cancel any pending tasks from the arming automation sequence.

I’ve been looking for a way to do that in Sharptools (or any workaround that would give similar results). The best I’ve come up with so far is to have a trigger every 10 or 15 seconds on the “disarm” switch to check if it has been turned on, with a series of nested if statements. I don’t find it very neat and it’s not “real time” like in Webcore which is not ideal.

Thanks for your help!

See this thread for some direction …

Thank you Nezmo!

That made me realize that a simple if statement after the exit delay to check if my virtual switch for arming has stayed on for the duration of the delay does the trick (since hitting my disarm button turns the virtual switch for arming off).

Great help! Problem solved!

2 Likes

Glad to help but I must give credit to @josh and others that gave me the original help.

1 Like