Input_select entity can't be found by card

I have been trying to adapt this neat Sonos Control Card to work with spotify playlists: https://github.com/vmcosco/HA-Sonos

It almost works, just that if I set it to use the speaker that I set as the input at the top I get the error “Unable to find referenced entities input_select.sonos_master”
When I check the entity list in HA, I see this entity is there though and that its also set.

This is the part of the ui_lovelave.yaml that send stuff to the card.

  # selects the playlist/source to play and calls the script
  spotify_playlist:
    default:
      - shuffle: true
    card:
      name: '[[name]]'
      color: var(--paper-card-background-color)
      tap_action:
        action: call-service
        service: media_player.play_media
        service_data:
          entity_id: input_select.sonos_master
          media_content_type: '[[media_content_type]]'
          media_content_id: '[[media_content_id]]'
          enqueue: '[[enqueue]]'
      template: input_button_thick_name
      type: 'custom:button-card'

The input.select in the configuration.yaml looks like this

sonos_master:
    name: Sonos Master Speaker
    options:
      - media_player.sonos_wohnzimmer
      - media_player.sonos_move
      - media_player.sonos_kuche
      - media_player.sonos_schlafzimmer
    initial: media_player.sonos_wohnzimmer

If I set the entity_id as one of my sonos speakers directly (e.g. media_player.sonos_wohnzimmer) it works, but obviously always plays the playlist on that speaker instead of what I previously clicked at the top of the cards.

Something tells me you’ll need a template here instead of referencing the input select as entity id. E.g.

entity_id: “{{ states(‘input_select.sonos_master’) }}”

Thanks @fenty17!
I have tried both your version (with adjusted quotes) and

entity_id: >
            {{ input_select.sonos_master }}

with no luck. I don’t receive any errors now, but it still doesn’t work. But I will look a bit further into this direction!

If you are using variables for button-card perhaps you could just set one up for your sonos entity id too?