Two triggers acting on the same entitiy

I’ve currently got two automations (configured using the UI) that act on the same entity. The triggers in the two automations are not related to each other and they have different conditions, but they carry out the same action on the entity.

I would like to have both triggers in the same automation, but it does not look like you can configure two triggers with separate conditions using the UI. I’m sure it’s possible to do by editing the yaml but i’m not sure of the syntax. I’ve tried the two options below (pseudo yaml) but neither work. Is what i am trying to do possible, or should it be kept as two separate automations ?

Option 1 :

alias: My automation
description: ""
triggers:
  - trigger: trigger 1
conditions:
  - condition: condition 1
actions:
  - action: action

triggers:
  - trigger: trigger 2
conditions:
  - condition: condition 2
actions:
  - action: action

Option 2 :

alias: My automation
description: ""
triggers:
  - trigger: trigger 1
  - trigger: trigger 2
conditions:
  - condition: condition 1
  - condition: condition 2
actions:
  - action: action
  - action: action

None of this yaml is pastable for me so its hard to understand what your asking without a correct visual (at least for me)

But if im understanding correctly: You would only need one trigger and then you use my favorite building block “Choose” this allows one trigger to have multiple condition and automation routes

Example: my light turning on is the trigger

Choose state allows unlimited options under it so i can say…

-when my light in on & no presence detected for 15 sec turn it back off (option 1)

-when my light in on & presence is detected for 10seconds do something lol (option 1)

but this is the way to go, i have blueprints that heavily rely on this



Choose states allows you to run advance conditions when you set condition to a template!

Yes, it’s totally doable using just the UI. All you need to do is add a separate Trigger ID for each trigger, then use a Choose based on that Trigger ID, with each path having its own conditions & actions.

1 Like

This is exactly what I was looking for. Thank you.