diff --git a/source/_integrations/camera.markdown b/source/_integrations/camera.markdown index 12125318bfc..2fd093ffb90 100644 --- a/source/_integrations/camera.markdown +++ b/source/_integrations/camera.markdown @@ -73,7 +73,7 @@ Both `duration` and `lookback` options are suggestions, but should be consistent | Service data attribute | Optional | Description | | ---------------------- | -------- | ----------- | | `entity_id` | no | Name(s) of entities to create a snapshot from, e.g., `camera.living_room_camera`. | -| `filename` | no | Template of a file name. Variable is `entity_id`, e.g., {% raw %}`/tmp/{{ entity_id }}.mp4`{% endraw %}. | +| `filename` | no | Template of a file name. Variable is `entity_id`, e.g., {% raw %}`/tmp/{{ entity_id.name }}.mp4`{% endraw %}. | | `duration` | yes | Target recording length (in seconds). Default: 30 | | `lookback` | yes | Target lookback period (in seconds) to include in addition to duration. Only available if there is currently an active HLS stream. Default: 0 | @@ -87,7 +87,7 @@ action: service: camera.record data_template: entity_id: camera.yourcamera - filename: '/tmp/{{ entity_id }}_{{ now().strftime("%Y%m%d-%H%M%S") }}.mp4' + filename: '/tmp/{{ entity_id.name }}_{{ now().strftime("%Y%m%d-%H%M%S") }}.mp4' ``` {% endraw %} @@ -98,7 +98,7 @@ Take a snapshot from a camera. | Service data attribute | Optional | Description | | ---------------------- | -------- | ----------- | | `entity_id` | no | Name(s) of entities to create a snapshot from, e.g., `camera.living_room_camera`. | -| `filename` | no | Template of a file name. Variable is `entity_id`, e.g., {% raw %}`/tmp/snapshot_{{ entity_id }}`{% endraw %}. | +| `filename` | no | Template of a file name. Variable is `entity_id`, e.g., {% raw %}`/tmp/snapshot_{{ entity_id.name }}`{% endraw %}. | The path part of `filename` must be an entry in the `allowlist_external_dirs` in your [`homeassistant:`](/docs/configuration/basic/) section of your `configuration.yaml` file.