Media_content_id via helper

Im trying to via a input_text: Helper to insert an url in to this line

media_content_id: “{{ states(‘input_text.radio1_url’) }}”

But it will not take the url, i am also using it in another place in the configuration where it is not a problem

type: horizontal-stack
  - type: custom:mushroom-template-card
    entity: media_player.living_room_speaker
      action: call-service
      service: media_player.play_media
        entity_id: media_player.living_room_speaker
        media_content_id: >
          {{ input_text.radio1_url }}
        media_content_type: music
    icon: mdi:speaker
    primary: '{{ states(''input_text.radio1_name'') }}'
    layout: vertical
    picture: '{{ states(''input_text.radio1_image'') }}'
      style: |
        ha-card {
          {% if state_attr('media_player.living_room_speaker', 'media_content_id') == states('input_text.radio1_url') %}
            {% if states('media_player.living_room_speaker') == 'playing' %}
              background-color: #002f7a;
              filter: none;
            {% elif states('media_player.living_room_speaker') == 'buffering' %}
              background-color: yellow;
              filter: none;
            {% else %}
              background-color: gray;
              filter: grayscale(100%);
            {% endif %}
          {% endif %}

i don’t believe the front end cards accept templates in the service call argument.

i would have your service call a script and have the script pass your text in via helper.

I am pretty new to this, but i have the rest working, but i hoped that as i am using the template card it would do it …

:person_shrugging: i could be wrong (wouldn’t be the first!!) but i thought the template is more around the rendering. but… still, give the script approach a try and see if that solves it for you.