I am trying to execute a set of automation rules a set amount of time after a boolean flag becomes true. I don't want to use a chron and would like for it to be event driven. I don't want to stop evaluation of the rest of the script - I just want to look at the difference in time from one event and if it exceeds a preset, perform a subsequent action. I have tried to write a sleep function and setTimeout - neither of which are working. Is there a better way to do this?
Pseudocode is as follows:
If startTimer = True and it has been 10s since startTimer has been set to True, set startRules = true.
Note: I currently have startTimer enabled to udate context.