Media_player Templating

How to select a target media_player without templating?

tap_action:
  action: call-service
  service: media_player.media_play
  target:
    entity_id: >
      {% if is_state('states.input_select.player_output.state',
      'media_player.kuche') %} media_player.kuche {% else %}
      media_player.badezimmer {% endif %}
  data:
    media_content_id: ''
    media_content_type: ''

Error: media_player/media_play. Templates are not supported here.

But how can I implement it otherwise?

1 Like