Hi, I have the following rule in RM 5.1. The Airgradient API call reports new values every 4 minutes, so the rule trigger gets new values every 4 minutes.
It starts but then does not run for the full 5 minutes. it turns the switches off in under 1 minute.
Why does it do that and how can I configure this rule to run the full 5 minutes?
Logs
Summary
Nothing cancels your delay. If you want that to happen on a re-trigger, you'll need to select "Cancelable?" on that delayed action and also insert a "Cancel Delayed Actions" at the beginning of your rule (or some place else that will be reached before this action or another delay, etc.). So, what's probably happening is that your rule is re-triggering, and all of the previous delayed actions are doing exactly what they were scheduled to do -- while new ones are still being added.
It looks like you also tried -- and disabled -- a "standalone" delay instead of the delay option on the action. Perhaps you switched approaches to see if this would change the behavior. There is a difference (if you had actions after the delayed action, they'd proceed immediately with just that action being delayed, as opposed to pausing at the delay itself -- but there aren't any in this rule, so it would be the same). But you'd need to do the same on this action if you wanted to use that instead and wanted the same behavior.
As an alternative, you could simply use "Wait for events" and select "Elapsed time" as the "event" to wait for. Waits are automatically cancelled when a rule re-triggers.
1 Like
Also strings of delays are not additive. In that they do not run in series but in parallel.
Successive delay actions are, but not delays on an action. I mentioned this difference above. This rule has only the latter (at least in use; the other was commented out, and my guess why is above, too
).
thank you for clarifying turning on cancelable and adding the cancel all pending actions did the trick
1 Like