Wait for trigger inline in automation?

Hi,

I’m curious to know about the difference between having an Automation A defined with two triggers and an Automation B defined with one trigger and then a Wait for a Trigger statement.

Automation A would be:

  • Trigger 1: React to external event => start some stuff and set timer in future to when it should stop
  • Trigger 2: Reacts when the time is up, stops what ever is going on.

Automation B would be:

  • Trigger 1: React to external event =>
    • start some stuff
    • set timer in future to when it should stop
    • Wait for a Trigger (the time sensor)
    • When time is hit
    • Stop whatever

Is this just two ways of defining the same and is there any technological difference?

Thanks!

The first one is best.

You should avoid waiting in automations for longer than a few seconds.

This reduces the likelihood of the automation being interrupted when you restart, e.g. leaving your sprinkler valves on or climate control running full blast.

Even non essential actions can be annoying if not run when you expect them to, e.g. why didn’t my media player turn off?

1 Like