DCW
(Daniel Craig Williams)
February 1, 2021, 12:14am
1
Hi Everyone,
I’m trying to cast a link using:
media_extractor.play_media
and the following service data:
entity_id: media_player.lounge_room_tv
media_content_id: {{ states('input_text.media_link') }}
media_content_type: video
I have an input text helper for the media_content_id, however i keep getting the following error:
[547718334688] value should be a string for dictionary value @ data['media_content_id']
petro
(Petro)
February 1, 2021, 12:15am
2
Put the template in double quotes
DCW
(Daniel Craig Williams)
February 1, 2021, 1:23am
3
I tried that, it didn’t work
could you give me an example?
DCW
(Daniel Craig Williams)
February 1, 2021, 1:32am
4
From that I got"
ERROR: "{{states('input_text.media_link')}}" is not a valid URL. Set --default-search "ytsearch" (or run youtube-dl "ytsearch:{{states('input_text.media_link')}}" ) to search YouTube
petro
(Petro)
February 1, 2021, 1:44am
5
You can’t put templates in the developer tools / services tester.