Hi! Is it possible to send a spotify playlist to a google chromecast/audio device with home assistant. This is my config but I only got ideal when I execute the automation.
It is indeed now possible with the new Spotify component! I have not tested on a Chromecast, but I’m pretty sure it works. First, using your phone, open the Spotify app and play something on the chromecast.
Then setup the Spotify component according to its instructions: https://home-assistant.io/components/media_player.spotify/
Check that it is working by pausing and resuming something from within HA.
After that you can use the following (on a script or automation) to first select the chromecast:
How are you using the script to select the Chromecast as source?
As soon as my Chromecast goes idle it disappears from the source list and cant be chosen, until i manually start casting spotify to it again.
Hi, hope someone can help me. This post put me in the right direction for using Spotify but I am getting an error and I cannot see what’s wrong- Maybe someons can see whta’s wrong in this code (check configuration result):
I’m still a noob myself but I think your entity id ones don’t belong in configuration.yaml. Those look like they would be part of your automations.
For example, here is one I used for iheartradio a couple months ago in my automations.yaml. If you don’t have an automations.yaml and instead have your automation in your configuration.yaml, just do everything below with 2 more spaces under the automation part of your configuration.yaml
- alias: 'Turns on the chromecast and plays iHeartRadio on all devices each morning Monday thru Friday'
initial_state: 'on'
hide_entity: false
trigger:
- platform: time
at: '06:10:00'
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
action:
- service: media_player.play_media
entity_id: media_player.all_devices
data:
media_content_id: http://kbpi-fm.akacast.akamaistream.net/7/535/19810/v1/auth.akacast.akamaistream.net/kbpi-fm
media_content_type: audio/mp3
Hi, what you have is clearly an automation but I do not want to start Spotify automatically, I want it to start by clickind Play on the dashboard interface. I believe I am inserting the code in the right place as seen in other threads as well as in the documentation (https://home-assistant.io/components/media_player/)
Thanks for understanding my limited ability to help people Hopefully if nothing else these extra replies will help get your post seen by someone who can truly help.