Multiple delays in rule engine

Hi, all.
I don’t understand how the Delay option works in the rule engine. I am trying to set up a rule [xEtR1IJadfE7tLQqm1yo] which has multiple delays.


All the actions below “Delay for 3600 seconds” should execute at the same time, i.e., they should all have a 3600s delay. And the 3600 seconds should be after the event has triggered, not after the (previous) 60-second delay (which should only be for the action directly below it).

  1. Do i need to add a (3600s) delay rule before EACH action (or is one enough)?
  2. Will the actions happen after 3600s or after 60+3600s?

Hope that all makes sense!

If you want both actions to execute at the same time 1 delay is enough.

Actions 4 & 5 would be 60+3600

All actions in the block will execute in order so the 3600 seconds is after the (previous) 60-second delay, not the trigger.

If you want actions 4 & 5 to execute 3600s after the rule is triggered you can adjust the delay from 3600s to 3540s.

1 Like

Many thanks - all clear.

One other question:
Action 1 switches off my heating automation (assuming it is on). If i want to switch it back on after 3600s (only if it was on in the first place), what’s the best way to do that?

I would use a variable. You have 2 options.

Use a text variable.
Add the action as the top level action and the if block at the very end.

Use a true/false variable.
Add an If heater is on set variable true before your current if block. Keep your if then block as is and add a 3rd if block, if variable true, turn on heater, set the variable to false.

1 Like