Hi! I would be great to send a Spotify playlist throw HA, but can’t get it to work.
alias: Chromecast audio on - lungt & skönt i köket
trigger:
platform: state
entity_id: input_boolean.spotify_lungtochskont
state: 'on'
action:
- service: switch.turn_on
entity_id: switch.google_audio_koket
- service: media_player
entity_id: media_player.spotify
media_content_id: spotify:user:spotify:playlist:37i9dQZF1DXcwkNsfYPDPQ
media_content_type: playlist
- service: media_player
entity_id: media_player.spotify
source: media_player.kok
Any idea? Or solution to my request?
One problem could be that the spotify component can’t “see” the chromecasts unless you have started playing on them from an other source already, for example an android phone, at least that how it workes for my regular chromecast and google home.
A second point is the:
- service: media_player
entity_id: media_player.spotify
source: media_player.kok
I think it should be:
- service: media_player.select_source
data:
entity_id: media_player.spotify
source: Name_of_your_chromecast
Here is a script I have which i know works, but only when my Chromecast is already playing something from spotify, or recently has:
spotifydemo:
alias: 'Spotify on Home'
sequence:
- service: media_player.select_source
data:
entity_id: media_player.spotify
source: Living room Home
- service: media_player.shuffle_set
data:
entity_id: media_player.spotify
shuffle: 'true'
- service: media_player.play_media
data:
entity_id: media_player.spotify
media_content_type: playlist
data_template:
media_content_id: 'spotify:user:trisk3lion:playlist:1KH7pw5kxsppOdINedp8Ub'
robwolff3
(Rob Wolff)
January 15, 2018, 5:13pm
3
I figured out a work around over on Spotify Playlist Player