I have a doorbell automation which plays an announcement on smart speakers and media players, then streams a video from the doorbell to a couple of Google smart displays. I am finding that the announcement, even though it is less than 3 seconds long, is being truncated by the commencement of the video stream on the same device.
Is there any way of queueing these actions so that the video stream only starts when the previous media item playback has completed? I could put in a delay, but I’d prefer it if the stream just commenced as soon as possible after the announcement.
This is the automation:
alias: Doorbell Pressed
description: ""
triggers:
- entity_id:
- binary_sensor.reolink_video_doorbell_wifi_visitor
to: "on"
trigger: state
conditions: []
actions:
- variables:
current_state: "{{ states('media_player.living_room') }}"
- sequence:
- data:
media_content_id: https://mydomain/local/front-door.mp3
media_content_type: music
action: media_player.play_media
target:
entity_id:
- media_player.lounge_display
- action: camera.play_stream
metadata: {}
data:
format: hls
media_player: media_player.lounge_display
target:
entity_id: camera.unnamed_doorbell