"Order of Events" trigger?

Let’s say I want an automation to happen, but I only want that automation to happen if the order of events are realized.

Example:

I arrive at home (trigger 1).
I open the front door (trigger 2).
= specific automation, contingent upon this sequence within a given time frame.

I arrive at home (trigger 1).
I open the mailbox (trigger 2).
I open the gate (trigger 3).
I open the back door (trigger 4).
= specific automation, contingent upon this sequence within a given timeframe.

These are all automations that would happen as a result of a pattern of behaviors. If the entire sequence was interrupted by a new trigger or detected state (i.e., left the mailbox open) then the automation might be different because not all of the triggers were satisfied within a specific period of time…etc.

Is this possible without extremely difficult NodeRED wiring and conditions and variables, etc.?

Another example:

I have 3 lights in a hallway all independently controlled. I have 3 motions sensors in the hallway. The order in which the sensors are triggered within a period of time would determine the direction of the lighting as I walk through the hallway.

1 Like

Wait for triggers with timeouts and do not continue on timeout:

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

Did you ever figure this out? I am curious myself

Yeah, good idea. For example a doorbell button(ikea shortcut button) it has on and hold actions. Would be cool to make a secret push to light up lights or open a door or alarm system , haha…. Like 3 short 3 long or anything…

Would be great to be able to use something like if 3 short and 3 long button press happened within a period of time - trigger that.

Also opens all new world of double tripple clicks on buttons to get more actions going