Honeycomb Menu and Templating

Hi community
I need some help with my honeycomb card i’m trying to code.
I would like to add template code to the entity selection of a honeycomb button. The base card should use my Sonos Speaker as the main entity. When its connected to the TV i would like to access the TV entity (for information and controls) and if any other source is connected (e.g. Airplay) then the Sonos entity. I tried it with the code below but the template code isn’t parsed and i only get the code as a string back.

type: custom:mushroom-entity-card
entity: media_player.wz_sonos
layout: vertical
tap_action:
  action: call-service
  service: honeycomb
  service_data:
    entity: media_player.wz_sonos
    autoclose: false
    buttons:
      - icon: mdi:information-variant
        entity: |
          {% if is_state_attr('media_player.wz_sonos', 'source', 'TV') %}
            media_player.wz_tv
          {% else %}
            media_player.wz_sonos
          {% endif %}
        action: more-info

I’m happy for any solution and information if what i’m trying to achiev is even possible.
Thanks