I’m making an automation to play a media clip, followed by a voice announcement. I’ve tried using the state.idle action on the speaker but that’s too unwieldy because I am playing it to many speakers at once. The documentation for the media_player.play_media service shows an enqueue attribute that sounds like just what I need, but I can’t get it to work. No matter what value I put there, it skips the media clip and goes right to the announcement. Here’s some test YAML:
alias: Another speaker test
description: ""
trigger: []
condition: []
action:
- service: media_player.play_media
target:
entity_id: media_player.bedroom_speaker
data:
media_content_id: media-source://media_source/local/modern-tech-logo-13492.mp3
media_content_type: audio/mpeg
enqueue: add
metadata:
title: modern-tech-logo-13492.mp3
thumbnail: null
media_class: music
children_media_class: null
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://media_source
- service: media_player.play_media
target:
entity_id: media_player.bedroom_speaker
data:
media_content_id: >-
media-source://tts/tts.google_en_com?message=This+is+a+test.+Please+ignore+it.&language=en-uk
media_content_type: provider
enqueue: add
metadata:
title: This is a test. Please ignore it.
thumbnail: https://brands.home-assistant.io/_/tts/logo.png
media_class: app
children_media_class: null
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://tts
- media_content_type: provider
media_content_id: >-
media-source://tts/tts.google_en_com?message=This+is+a+test.+Please+ignore+it.&language=en-uk
mode: single
I can’t find any examples of how to do this. Can someone help?