Hello dear community,
I am not a newbie but have not much experience with data templates.
Got two cameras that i want to save snapshots with time and entity name.
The following is working in developer mode but not in a Script i am writing. The script throws this error:
[140602836889024] Error rendering data template: UndefinedError: 'entity_id' is undefined
The working code in developer mode:
service: camera.snapshot
data:
filename: >-
www/snapshots/snapshot_{{ entity_id.name }}_{{
now().strftime("%Y%m%d-%H%M%S") }}.jpg
target:
entity_id:
- camera.front_door_cam
- camera.living_cam
The above is working ok and saves two snapshots to the configured folder.