Is wait_for_trigger "and" or "or" when multiple trigger wait events?

I’ve been wondering with wait_for_trigger in automatons, if you have more than one trigger, is it effectively an “or” with them, so when one happens the wait is ended?

Documentation says it’s an OR:

The script will continue whenever any of the triggers fires.

https://www.home-assistant.io/docs/scripts/#wait-for-a-trigger

1 Like

… it is indeed or because they are triggers, not conditions. It is impossible for them to fire exactly at the same time.

If you want an and on two conditions, you could consider a wait template or a wait for with a template trigger. Note that the second requires the template to to evaluate to false first, because the trigger won’t fire if the template is already satisfied at the start.

1 Like

Darn, can’t believe I missed that on that page :face_with_peeking_eye: thanks for the direct link.

Seriously I found that page but somehow missed that section :pensive::hot_face:

Thanks for the suggestion! I’ll look into wait templates.

1 Like