-
-
Notifications
You must be signed in to change notification settings - Fork 36.8k
Open
Description
The problem
During reload of template sensors, this Platform template does not generate unique IDs is logged (see below).
This is a problem not only but especially for binary_sensor.deckel_redacted (notice it's not binary_sensor.deckel_redacted_2 but the original/first/master/whatever entity), which stops working completely.
Only a HA restart works around this.
Template sensor unique_ids are 100 % unique: created by VS code, every affected sensor has been searched for in all .yaml files - only one occurence.
What version of Home Assistant Core has the issue?
core-2025.10.4
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
template
Link to integration documentation on our website
https://www.home-assistant.io/integrations/template/
Diagnostics information
No response
Example YAML snippet
template:
- trigger:
- platform: state
entity_id: binary_sensor.vibration_redacted
id: "sensor"
# Backup
- platform: state
entity_id: binary_sensor.deckel_redacted
to: "on"
for: "00:30:00"
id: "stuck"
- platform: homeassistant
event: start
- platform: event
event_type: event_template_reloaded
binary_sensor:
- name: "Deckel Redacted XYZ"
# entity_id: binary_sensor.deckel_redacted
unique_id: 9b66d7b5-608b-43f1-b838-edcce4e11130
device_class: opening
icon: mdi:door
delay_off:
seconds: 1
state: >
{{ trigger.id == "sensor" and state_attr('binary_sensor.vibration_redacted', 'orientation')[2] > -70 }}
availability: "{{ 'binary_sensor.vibration_redacted' | has_value }}"
auto_off:
minutes: 30Anything in the logs that might be useful for us?
Logger: homeassistant.components.binary_sensor
Quelle: helpers/entity_platform.py:843
Integration: Binärsensor (Dokumentation, Probleme)
Erstmals aufgetreten: 16:42:45 (24 Vorkommnisse)
Zuletzt protokolliert: 23:48:13
Platform template does not generate unique IDs. ID 99c55cc8-bee1-412b-b117-2427080dde68 is already used by binary_sensor.updater_rpi3_host - ignoring binary_sensor.updater_rpi3_host_2
Platform template does not generate unique IDs. ID 9b66d7b5-608b-43f1-b838-edcce4e11130 already exists - ignoring binary_sensor.deckel_redacted
Logger: homeassistant.components.sensor
Quelle: helpers/entity_platform.py:843
Integration: Sensor (Dokumentation, Probleme)
Erstmals aufgetreten: 16:42:46 (12 Vorkommnisse)
Zuletzt protokolliert: 23:48:11
Platform template does not generate unique IDs. ID e558114c-3273-4016-9e15-33038a274a2b is already used by sensor.updater_any - ignoring sensor.updater_any_2Additional information
- We have had a similar thing in the past with command_line sensors in Platform command_line does not generate unique IDs #80188. This was magically fixed when I updated to HA Core 2023.6 at that time. I could not track down following the issue which change for command_line sensors might have got implemented at that time.
- https://community.home-assistant.io/t/how-to-manually-set-state-value-of-sensor/43975/277
Reactions are currently unavailable