How to exit a rule when I push a button

Anyone knows if there is a way to exit a rule when I push a button?
Example: My rule turn on a light, then wait a minute and turn on another light, wait an additional minute and open a door, wait another additional minute and close a blind. What I want is that in the middle of all this process if I push a button then the rule to stop immediately

How are you starting the rule?

If you start from a button press, use Button Controller for the initial rule (above), and have a double press (or hold) have the action: Stop actions: this rule.

If you start from something else, say motion, then you could use as an action following the button press "stop rule actions" and select the appropriate rule (above).

You could predicate each portion of the rule with a test of Private Boolean, and have a separate rule, fired by your button, that changes the first rule's Private Boolean to false. Each of those predicate tests would be an IF-THEN-ELSE construct, where the IF-THEN side is the action you describe, and the ELSE part is Exit Rule.

So, indirectly, each time before it would do any of the actions, it tests to see if its been killed by the button. You'd have to also figure out how to reset Private Boolean to true. Depending on how this rule is triggered, maybe that's just the very first action.

Alternatively, and a bit simpler, would be to just use a Simple Conditional action for each action, that tests PB for true. The rule wouldn't exactly just exit, but it would stop doing anything once the button was pushed. Whether or not that would work would also depend on how its triggered. As long as it won't be triggered again before all of the delays played out, that would work. Otherwise, you'd need the first approach so that it actually does exit shortly after the button being pushed.

thanks for suggestions, I will give a try tonight once back home

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.