Gives a simple text input card or field?

Hello,

i need a input field where i can write a text in, for example “Spiderman” and than a button where i can click to play this movie on a device.

i must write something in and not choose something from a list.

its for starting a movie, on a selected device, but i found no way?

or must i give the text to a script, this saves the name and than play the movie?

You will need to:

  • Create helper input_text entity
  • Place the created input_text entity to a dashboard
  • Create new script that will use media_player.play_media service, for example from plex here
  • This script will also accept the movie name, instead of hardcoding it, you use template like described here

So your final service call will look something like this:

service: media_player.play_media
data: 
  media_content_type: movie
  media_content_id: >-
    { "library_name": "Movies", "title": "{{ states('input_text.example') }}" }

I haven’t tested this but this should give you enough to figure stuff out. If media_content_id is not properly filled you can create a custom sensor template entity that will have the whole text and use that like:

media_content_id: "{{ states('sensor.example') }}"
  • Finally place the script to dashboard using numerous different ways, for example a button which when clicked executes it.
2 Likes

Thank You, for your fast help. Work very well.

Hi I know this is an old post, but any chance you could share your coding?

I have tried this, and can’t get movie to play on Plex for my roku device