Input select to set radio station for a squeezebox client

Hi all,

I want to make a selector in Hass that allows me to choose a radio station to be sent to a Pi zero connected to my lounge speakers. The Pi is running a squeezebox client (squeezelite on Max2Play).

Currently I’ve got as far as trying to send a radio stream to the lounge whenever I change the state of input_select.radiostation, ultimately I will want to send the appropriate stream for the input selected. However it’s not working currently. I’ve tested that the input select is being recognised properly by making the action toggle a light instead and that behaved as expected.

I presume that I’m not sending the URL of the stream to media_player.loungespeakers in the right way but I’m not sure what I’m doing wrong. Any ideas?

my configuration.yaml

input_select:
  radiostation:
    name: Pick a station
    options:
     - Absolute
     - Radio X
     - Heart
     - Magic
     - Radio 2
     - Classic
    initial: Absolute
    icon: mdi:radio

my automations.yaml

- alias: Set the Radio Station
  trigger:
    platform: state
    entity_id: input_select.radiostation
  action:
    service: media_player.play_media
    data: 
      entity_id: media_player.loungespeakers
      media_content_type: music
    data_template:
       media_content_id: http://opml.radiotime.com/Tune.ashx?id=s16679&formats=aac,ogg,mp3,wmpro,wma,wmvoice&partnerId=16&serial=2280d6fd06b87d0f9daea3d2bfc6a67f