Help with delay timing rules


Apologies if this is a simple/stupid question. Looking for advice on how to make delay timing in rule machine work.

I use this rule to turn the speaker in my ensuite up (to the volume of the adjacent room) when motion is detected in the room.

Then once motion is not detected, I use this rule to wait a few minutes and return the volume to 1.

The problem is that, unlike the motion lighting apps, it seems the countdown doesn't reset if motion is detected again. So as soon as the sensor goes inactive, 6 minutes from then the volume will go down, even if there's been heaps of movement in the room in the meantime. Any tips on how I can write this rule so that the countdown resets if more motion is detected?


You can actually accomplish this in one rule.

Trigger: Motion Active

Cancel delayed actions
Set volume to master volume(using your existing logic)
Wait for event motion inactive
set volume to 1 -> delay 5 min (cancelable)

The key is to cancel delayed actions. If you want the two rules for ease of change, just put a Cancel timed actions > Other rule in your Active rule.

Let me know if this isn't clear!

Thanks so much for your help Hasty, much appreciated!

I might leave it as two rules for the moment, only because I don't trust myself to successfully merge them :stuck_out_tongue:

I have added this to the volume up rule, is this what you mean?

Thanks again!

Cancel Delayed actions will only cancel actions for that rule. There is another option to cancled the timed actions of another rule as seen in the screenshot below

You would want to use this and select the volume down rule as the one you want to cancel timed events.

Ah I see! Like so?

1 Like