I have a Good Morning automation that triggers when motion is detected in the family room in the morning. It triggers Alexa media player to run the Alexa Good Morning routine and wish them a good day through an Alexa TTS message.
I have a binary boolean set so that this automation turns off the boolean and only runs once in the morning.
I also have a Welcome to the Kitchen automation that triggers whenever motion is detected in the kitchen during the day. It triggers an Alexa media player TTS message welcoming them to the kitchen.
If the person in the morning walks into the kitchen from the family room, Alexa’s Good Morning routine is interrupted and the welcome to the kitchen tries to play.
Is there a way to wait until the Alexa Good Morning message is completed before executing the Welcome to the kitchen automation?
How do I know when a routine is completed?
This might not work because the states don’t always update in a timely manner, but I would try adding a “Wait for Trigger” action to your kitchen automation to check the state of the family room echo.
- wait_for_trigger:
- platform: state
entity_id: media_player.family_room
to: "standby"
for: "00:00:20"
timeout: "00:01:00"
- service: notify.alexa_media
### The rest of your service info ###
Thank you very much for your prompt response. I appreciate your help. I will try out the suggested approach.