Need help how to play Spotify via Chromecast Audio in automations.yaml

Every morning I would like to automate so that a relaxing playlist (or random from a few playlists) is played from Spotify and outputed to my speakers via Chromecast Audio.

I have managed to configure Spotify and that works. Can somebody help me how I should write automation code to play a playlist every morning at 06:00:00?

 - alias: 'Playlist to Chromecast via Spotify'
    trigger:
      platform: time
      at: '05:45:00'
    action:
      - service: ???
      .........

I believe I need somehow to use

  • service: media_player.play_media
  • entity_id: media_player.spotify
  • media_content_type: playlist
  • media_content_id: “
  • source: media_player.kitchen (??? or what should I write here?)

Thanks for any help!

Did you manage to get it work?

Unfortunately not. I did a 2nd take on this one a few days ago, but still no success.

Have you managed to get this working?

No, I think it just doesn’t work. Maybe the following thread helps:

It would be nice to understand why it does not work. I have tried both with Chromecast and Google Home.