Action of the enable/disable switch on a rule

When you disable a rule while it is running, does it kill it right away or does it run to its completion and then stop? I’m specifically curious about the effect of the switch if the rule has a delay period set up in it.

Disable

It will cancel any already ‘scheduled’ items (eg. timers, delays, etc). So if the rule had a 5 minute delay in it and the rule was triggered and got to the point where it was waiting the 5 minute delay and you then disable the rule, it will cancel the delay.

But if the rule is already actively executing and not just awaiting a delay, it won’t kill an in-flight execution of normal actions such as evaluating conditions, sending commands, etc. That’s generally not a problem in most cases since most rules execute quickly.

Enable

When you re-enable the rule, it will reschedule the timer triggers. And of course delays within the flow will execute as normal again once the rule is enabled and triggered.

1 Like

That’s good to know. I like that it cancels the running delay so that when developing a rule, if you don’t like the results you are getting when testing, say within variables that you can see when editing the rule while it is running and pointing at the variable, you can disable it to cancel it’s operation, make your changes and re-start, without risking having multiple instances of the rule running.

Thanks Josh.

Also helpful when irrigation schedule triggers on a wet yard in the rain, and my threshold rule for rain forecast percentage wasn’t quite right :slight_smile:

2 Likes