I am trying to do this in a script:
camera_recording:
sequence:
- service: media_player.play_media
data_template:
media_content_id: "https://krautclan.com/api/camera_proxy_stream/camera.{{camera }}?token={{ state_attr('camera.{{ camera }}', 'access_token') }}"
which sends a URL for a certain camera along with the access token for that camera. But it does not work, the token comes out nil.
The “camera” variable is passed into the script. What is the best way to accomplish this?
Thanks!