Append_media function for media_player component

Hello.
I’m in need of a way to queue media on MPD in order to play thing one after the other instead of cutting the current for the newer media.

The idea is to then replace the TTS action on media from play_media to append_media on media integration who support it. (using a flag in the service call)

This way you can easily plane something like :

  • Chime > TTS
  • TTS “Welcome home” > TTS “Number of voicemail” > TTS “List of chore” > TTS"

You get the idea.
This have multiple benefit :

  • You don’t have to put “guess” sleep or wait for the state of the player to change to tringer the next event
  • Transition are seamless
  • All TTS get generated right at the start, so there is less delay is the sound files isn’t in cache
  • You can make “shorter” TTS, have more of them not changing and cached, and keep API call count lower
  • Because it’s not TTS only, you can request to play the song X after the current song

In order to do this, a media player integration should handle playlist. i know the one i use (MPD and Squeezelite) does, and i think once the base action is added to the media_player component, it will be easy to add it to most media player integration.

I did try to look at the code myself, but the depth of inclusion of a project as big as home assistant is to overwhelming for a script-kidi.
So if it help, i’m ready to put a small bounty on it, in order to thank’s dev for working on this for me. (nowhere near a real compensation for the hours of work, but still a little “thank you”) Is there i place for that ?

I just saw that someone had done something for me :heart_eyes:
But without telling me :roll_eyes:

I added this as a custom component and i work well.
it look so easy, but i guess there is some issue because it have been blocked until they talk about the need.

Vote for it! :wink: