When i use the build in media browser i can easily cast a plex playlist to my google home mini. Works perfectly.
I just can not seem to figure out how to do it from a automation / node-red / developer tools.
What am i missing here? I`m perfectly able to cast other media (video, songs, pictures), just not playlist. But given it works so easy from the media browser i must be missing something…
Any help would be greatly appreciated! Hate to wake up to the same song every day
I’m casting to Chromecast Audio, but I wouldn’t expect it to be different for the Home Mini.
I have two drop-down input helpers for choosing the playlist to play (e.g. Upbeat fresh) and the speakers to play it on (e.g. media_player.office_speaker), then I have the following automation. Note there aren’t any quotes around the playlist or speaker names in the input helpers.
alias: "Media: play Plex playlist"
description: >-
Play the specified playlist on the specified speakers when the Play Playlist
button in the dashboard is clicked.
mode: single
triggers:
- entity_id:
- input_button.play_playlist
trigger: state
conditions: []
actions:
- target:
entity_id: "{{ states(\"input_select.plex_speakers\") }}"
data:
media_content_id: >-
plex://{ "playlist_name": "{{ states('input_select.plex_playlist') }}",
"shuffle": "1" }
media_content_type: playlist
metadata:
title: "{{ states{'input_select.plex_playlist') }}"
media_class: playlist
children_media_class: null
action: media_player.play_media
which is triggered from my dashboard with an Entities card: