Casting playlists (from Emby, YouTube) to Chromecast

I know how to set up a service call to cast a single item (video from Youtube or Emby server) to a Chromecast, but I totally do not get how to cast a whole playlist and have Chromecast play all the items. I tried both media_player.play_media with YT playlist ID and media_extractor.play_media service with the full playlist URL; in both cases, Chromecast plays just the first playlist item.

Could you guys please help me get unstuck? Thanks!

Hi! Did you solve this?

Thanks!

No. I guess this is not possible.

Hey, after a lot of mucking about I was able to get this working on my android TV. This is part of a kind of panic button automation to play the latest Sesame Street video on YouTube when my son is too much to handle :joy:

In order to use this service, you must enable the android TV integration. https://www.home-assistant.io/integrations/androidtv/

service: androidtv.adb_command
data:
  entity_id: media_player.android_tv
  command: >-
    am start -a android.intent.action.VIEW -d
    "https://www.youtube.com/watch?v=w4btM4maxKU&list=PL8TioFHubWFucN8uHuSR0cptOzTqYLjC8"
    com.google.android.youtube.tv

You can also use the same command to play individual YouTube videos:

service: androidtv.adb_command
data:
  entity_id: media_player.android_tv
  command: >-
    am start -a android.intent.action.VIEW -d
    "https://youtu.be/88XnLyYValM"
    com.google.android.youtube.tv

Note: Ensure you replace โ€˜media_player.android_tvโ€™ with whatever your android TV entity is called in your instance of Home Assistant. The trailing com.google.android.youtube.tv in the command is needed when the YouTube app is not already active on your TV.

2 Likes