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!
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
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.