The trigger function could be expanded to include await for event function. This would then allow a sequential series of events to initiate and action.
e.g. I want home assistant to say hello when i arrive home. I can trigger off the front door contact sensor, but wish then to wait until the IR sensor is triggered, so I know that the person is in the correct room to hear the message.
Just two suggestions in case this never gets done.
You could just trigger off the IR sensor with a template_condition such that the door was triggered recently. Something like the following would require the door being triggered within the last minute.
`trigger:
platform: state
entity_id: sensor.ir
state: ‘on’
condition
My method involves toggling the “welcome home” automation off after it executes one time. Then when I leave home, an automation event turns the “welcome home” automation back on, so that when the front door is opened, it waits a few seconds for you to get your shoes off and then executes. At the end of it’s execution, it again turns itself off until leaving home turns it back on again.
This could work for your motion sensor, so the first time it sees motion in your front room, it executes.