Selecting Pandora radio stream within Home Assistance for Sonos

I am attempting to select a Pandora stream to start playing from within Home Assistant without luck. Here is my input_select:

input_select:
  sonos_favs:
    name: Sonos Music
    options:
      - Country Music
      - 60's Radio
    icon: mdi:music-circle

Here is my automation:

  - alias: Sonos Favorites
    trigger:
      platform: state
      entity_id: input_select.sonos_favs
      state: 'Country Music'
    action:
      - service: media_player.play_media
        entity_id: media_player.living_room
        data:
          media_content_id: 'pndrradio:286589746060891514?sn=1'
          media_content_type: 'MUSIC'

However, when the automation runs, Sonos throws about stream not tide to my account. What have others done to select Sonos streams from within Home Assistant?

Thanks!

1 Like