From 86b5b9079b1c2da6a8842a11fe181ebaf017f415 Mon Sep 17 00:00:00 2001 From: poulti <5324564+poulti@users.noreply.github.com> Date: Tue, 28 Jan 2025 09:10:20 +0000 Subject: [PATCH] Update camera.markdown (#37147) For actions Record and Snapshot, rename the user defined variable `entity_id` to a different name (suggested my_camera_id) to avoid the confusion between the data attribute `entity_id` and the user defined variable `entity_id` --- source/_integrations/camera.markdown | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/_integrations/camera.markdown b/source/_integrations/camera.markdown index 85caa1c4dc2..90d3ef5626c 100644 --- a/source/_integrations/camera.markdown +++ b/source/_integrations/camera.markdown @@ -104,12 +104,12 @@ For example, the following action in an automation would take a recording from " ```yaml actions: - variables: - entity_id: camera.yourcamera # Store the camera entity_id in a variable for reuse + my_camera_id: camera.yourcamera # Store the camera entity_id in a variable for reuse - action: camera.record target: - entity_id: '{{ entity_id }}' + entity_id: '{{ my_camera_id }}' data: - filename: '/tmp/{{ entity_id }}_{{ now().strftime("%Y%m%d-%H%M%S") }}.mp4' + filename: '/tmp/{{ my_camera_id }}_{{ now().strftime("%Y%m%d-%H%M%S") }}.mp4' ``` {% endraw %} @@ -132,12 +132,12 @@ For example, the following action in an automation would take a snapshot from "y ```yaml actions: - variables: - entity_id: camera.yourcamera # Store the camera entity_id in a variable for reuse + my_camera_id: camera.yourcamera # Store the camera entity_id in a variable for reuse - action: camera.snapshot target: - entity_id: '{{ entity_id }}' + entity_id: '{{ my_camera_id }}' data: - filename: '/tmp/{{ entity_id }}_{{ now().strftime("%Y%m%d-%H%M%S") }}.jpg' + filename: '/tmp/{{ my_camera_id }}_{{ now().strftime("%Y%m%d-%H%M%S") }}.jpg' ``` {% endraw %}