How to use one automation in another?

Is or will there a way to use one automation in another?

Do you mean nested IF statements?

As @prjct92eh2 Said, we would need more examples about what exactly you were trying to do, it’s not quite clear.

You can definitely have one automation trigger another by having the first automation turn on a virtual switch, and then having the second automation react to that virtual switch coming on. Field techs usually call that a “daisy chain.” it can be a very useful technique. :sunglasses:

Depending on exactly what you’re trying to do, you might also be able to do it by having an automation activate a scene. This is particularly useful when you have a set of lights that you want to turn on to particular dim, color, and color temperature settings, and you want to have different events trigger that particular scene for different reasons.

So there’s probably a way to do it, but we need more details to be sure.


Exactly what you described about using “daisy chain”.
Just like in webcore, where one can create one piston to activate other pistons, I was wondering if one automation can be referred in other automation instead of using virtual switches or scenes (Daisy chain).

Not directly, no. You have to use a virtual switch to tie them together.

One of the reasons to avoid daisy chaining is to avoid to build infinite loops. As you could do that by what you were asking for.

Automation A triggers B.
Automation B triggers C.
Automation C triggers A.

Then you have an infinite loop. The only hope to exit the loop, that you would hit a Guardrail or Limit.

A lot of daisy chain setups have an off switch included. The automation is only allowed to run while the switch is on. You turn the switch off and then that stops the next iteration.

But in the new V3 app you can just disable one of the automations, and that would stop the loop. :sunglasses: