Canceling delayed actions across rules

Hi if you start a Delayed action that is cancelable in one rule, then later have another rule do the action cancel delayed actions, does it cancel delayed actions across other rules or only within itself ?

It appears that the cancel delayed action only works within the same rule based on what I am seeing.

If so how do you cancel a rule in another rule or do I have to do some special trigger to handle it within the rule starting the action?

This rule runs at during the night and sets up a delayed action(Downstairs Hall Dimmer: 20 --> delayed: 1:30:00 (cancelable) ):


The above action starts the delayed action.

Then the following rule runs before the time ends from the above delayed action.


This rule does a cancel delayed actions but does not seem to work since later I see the previous rules' delayed action still execute.

In the second rule, add an action"Set Private Boolean, Run/Cancel/Pause Rules"
Then choose "Cancel Rule Timers"
Choose the name of your first rule from the dropdown box.

Interesting ok will give it a try later. Also considering having the other rule also trigger on the night mode change since then the rules will be less coupled together.

You cannot cancel delayed action in another rule. It can only be done within the same rule. Canceling delayed actions in Rule #2 doesn't affect the delayed actions in Rule #1. They are 100% independent.
The only thing you can do from another rule is to cancel all rule timers. But that will also cancel any periodic triggers in that rule until you go back into the rule and click done on the rule again.

Thanks for the help found pietsnot solution works, but preferred to have the rules more decoupled so changed the second rule to make it more self-contained.

So tried this first(pietsnot solution) which did work(But coupled the second rule to the first):

So went with this solution of letting the second rule trigger on a mode change and reset things correctly. More decoupled so easier to maintain in the future.

Thanks for the help!

Actually this is not correct look at pietsnot's solution, but did not go with this approach.

Actually, it completely is correct. You cannot cancel delayed actions from another rule. Only from within the same rule. His solution is "Cancel all timed actions" which is exactly what I said.

And that doesn't just cancel your delayed actions but all timed actions and periodic triggers. So, if the rule has any type of trigger related to time of day, that schedule is cancelled until you go back into the rule and click "done".

2 Likes

Ok I thought you meant that you can only cancel rule timers for all rules globally, but not for a specific rule (which I did in my first example).

Did not realize the affects on the periodic triggers thanks, glad I went with the second solution then.