How to cast a long URL via UI?

Hi Community,
I am trying to solve an issue that I couldn’t workaround at this moment.

In general, I would like to cast (media_player.play_media service call) a URL towards a media_player via UI. Please note that the URL length can be more than 400 characters.
The service itself is properly working and can be launched via the service dev tool:

{
  "entity_id": "media_player.entityname",
  "media_content_id":"URL",
  "media_content_type":"video"
}

In order to avoid the service dev tool, I wanted to put everything into the UI.
image
I therefore created an input_text and a script. The script looks like the following:

scriptname:
  alias: 'Cast'
  sequence:
    - service: media_player.play_media
      data_template:
        entity_id: media_player.entityname
        media_content_id: "{{ states('input_text.media_link') }}"
        media_content_type: "video"

When running the script, the input text can’t fetch the input_text URL because it extends the 255 characters limitation.
Do you see any other possibility to input a long URL (more than 255 characters) and trigger the service via UI?

Thanks in advance

1 Like

Anyone??? I have the same usecase.

As a workaround you could try dynamic URLs. With this method your ‘Cast’ command would contain a static URL which would then be ‘resolved’ (redirected) to the input URL: