I’m getting the same warnings, at first I just placed {{ entity_id }}
without anything else, but then i got the same warning again…
NODeeJay
(Alexander Weber)
November 24, 2024, 2:38am
22
But how to handle actions with multiple entities. Do we need to create an action for every camera?
I tried entity_id
as in the documentation Camera - Home Assistant , entity_id.entity_id
and entity_id.name
, all throw the error through spook.
Have you find a solution for this error? because on the official Home Assistant instructions it even says to use {{ entity_id }}
NODeeJay
(Alexander Weber)
November 28, 2024, 12:31am
24
Well, no, but the cause: Camera.record service not working with entity_id.name in template, says entity_id is undefined · Issue #40241 · home-assistant/core · GitHub and see the commit below: Deprecate entity_id template variable in camera services by emontnemery · Pull Request #128592 · home-assistant/core · GitHub
I tried to find hints how I could do this with a variable but how do I step through them?
In the end I filed a bug, maybe add your thumbs there to gain a bit more attraction:
opened 12:29AM - 28 Nov 24 UTC
integration: camera
### The problem
With the the change https://github.com/home-assistant/core/pu… ll/128592 discussed in https://github.com/home-assistant/core/issues/40241 the option to use the variable `entity_id` in a filename template when multiple entities are provided will not work anymore, however it was mentioned several times in the thread by multiple users.
this:
```
action: camera.record
target:
entitiy_id:
- camera.cam1
- camera.cam2
- camera.cam3
data:
filename: {{ entity_id }}.mp4
```
will not work anymore and I did not find a way to pass an array to the variable one should define as suggested in the docs.
### What version of Home Assistant Core has the issue?
2024.11
### What was the last working version of Home Assistant Core?
2024.10
### What type of installation are you running?
Home Assistant OS
### Integration causing the issue
Camera
### Link to integration documentation on our website
https://www.home-assistant.io/integrations/camera/#action-record
### Diagnostics information
_No response_
### Example YAML snippet
_No response_
### Anything in the logs that might be useful for us?
```txt
A repair message is shown:
The pre-defined template variable entity_id was used when performing action camera.record targeting camera entity camera.cam_driveway_low_latency. The pre-defined template variable entity_id is being removed from the filename parameter of camera.record.
Please update your automations and scripts to use a manually defined variable instead and select Submit to close this issue.
```
### Additional information
_No response_
The docs are uptated, above the variable is in the example defined first and then used in the camera.record
action:
actions:
- variables:
entity_id: camera.yourcamera # Store the camera entity_id in a variable for reuse