Script GUI to play fixed radio stream on cromcast audio

Hi I tried to make a script using the GUI.
Its supposed to play a audio webstream on my chromecast audio.

in yaml it looks like this:

data:
  media_content_id: 'https://www.supla.fi/audio/3645082'
  media_content_type: audio/mp4
entity_id: media_player.kokken_anlaeg
service: media_player.play_media

It starts a casting to my chromecast, but no sound.
I can stop the cast again with another stop script, but why wont it play the stream?

any suggestions?

I think I learned that its quite narrow of which streams it accept.

found the streams with other mp3 and it worked.

now Im struggling with this not switching stream.

'1595021251798':
  alias: spil radio
  sequence:
  - service: media_player.volume_set
    data:
      entity_id: media_player.kokken_anlaeg
      volume_level: '0.35'
  - service: media_player.play_media
    data_template:
      entity_id: >
      {% if is_state('input_select.hojtaler', 'koekken') %} media_player.kokken_anlaeg
      {% if is_state('input_select.hojtaler', 'stue') %} media_player.stue_anlaeg
      {% endif %}
      media_content_id: >
      {% if is_state('input_select.radio_stationer', 'P1') %} http://live-icy.gss.dr.dk:8000/A/A03H.mp3
      {% if is_state('input_select.radio_stationer', 'P3') %} http://live-icy.gss.dr.dk:8000/A/A05H.mp3
      {% if is_state('input_select.radio_stationer', 'P4 kbh') %} http://live-icy.gss.dr.dk:8000/A/A08H.mp3
      {% if is_state('input_select.radio_stationer', 'P4 sjl') %} http://live-icy.gss.dr.dk:8000/A/A11H.mp3
      {% if is_state('input_select.radio_stationer', 'P6 Beat') %} http://live-icy.gss.dr.dk:8000/A/A29H.mp3
      {% if is_state('input_select.radio_stationer', 'P7 mix') %} http://live-icy.gss.dr.dk:8000/A/A21H.mp3
      {% if is_state('input_select.radio_stationer', 'DR nyheder') %} http://live-icy.gss.dr.dk:8000/A/A02H.mp3
      {% endif %}
    media_content_type: 'audio/mp3'      

when checking configuration it says:

Error loading /config/configuration.yaml: while scanning for the next token
found character ‘%’ that cannot start any token
in “/config/scripts.yaml”, line 29, column 8

which is where the first “if” statement starts, if thats any help?