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

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

my automations.yaml

- alias: Set the Radio Station
    platform: state
    entity_id: input_select.radiostation
    service: media_player.play_media
      entity_id: media_player.loungespeakers
      media_content_type: music