Templates: Passing a value to a script to be used for entity_id

With a Blink integration I need to pass the value of the camera’s entity id to a script. This script will trigger a capture, wait for a few seconds and do a refresh. I have not been able to figure out how to pass the entity_id to the script.
Here’s the non-working version of the script:

alias: Blink cam update
sequence:
  - service: blink.trigger_camera
    data_template:
      target:
        entity_id: "{{ message }}"
  - delay:
      hours: 0
      minutes: 0
      seconds: 10
      milliseconds: 0
  - service: blink.blink_update
    data: {}
mode: single

This is how I am trying to call it:

service: script.blink_cam_update
data:
  message: "camera.my_camera_name"

What am I doing wrong?

Try it this way:

  - service: blink.trigger_camera
    target:
      entity_id: "{{ message }}"
1 Like