Combination of triggers

Hi,
I would like to build an automation that executes an action only if a sequence of triggers happened. Something like a secret code. For example: open door, turn on and then off a light 3 times, and then push a smart button. After all these triggers are executed in that order to trigger an action.
I started an automation that combines triggers and helpers to store booleans in it but I am sure there is a better way of doing it.
Any ideas would be appreciated.
Thanks.

You could use a sequence of wait_for_trigger actions. They should have a time-out specified and continue on time-out set to false.

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

Thanks Tom, that is exactly what I needed! A lot simpler.

1 Like