Yahama receiver with Spotify Connect

Hi HA-community,

I am trying to extend my automations by creating a script that allows me to play Spotify’s Discover Weekly playlist on my Yamaha Network Receiver, using the designated component. I have a working script that is able to play internet radio via the NET RADIO command, however, I can’t get Spotify to work.

Would it be required to set up the Spotify add-on in Hass.io? I haven’t done that so far, as I am assuming that I wouldn’t be necessary since the receiver itself has Spotify Connect enabled.

As an illustration, my script looks like
`spotify_discoverweekly:

  alias: 'Spotify discover weekly'
  sequence:
  - service: media_player.turn_on
    data:
      entity_id: media_player.receiver_rx477
  - service: media_player.play_media
    data:
      entity_id: media_player.receiver_rx477
      media_content_id: 'spotify:user:adobeallen:playlist:07njoYLzedMR1wMGDSERhw'          
      media_content_type: "Spotify"`

I’ve selected content type: Spotify, as that is how it’s referred to in the devices Source List.

Any insights, or am I trying to accomplish the impossible (is anything impossible with HA?)

Directly from the component documentation.

Thanks for your prompt reply. That was clear and already implemented in another script I use. However, would I be able to play a Spotify playlist using the spotify component then?

Not sure, you’d have to configure spotify too see if it comes through on the receiver: