core: Platform command_line does not generate unique IDs
The problem
Plenty of errors in HA log (for EVERY command_line sensor):
Platform command_line does not generate unique IDs. ID xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx already exists - ignoring sensor.xxx
after reloading command line sensors in the dev-tools section, even ALL command_line
sensors do have a unique_id
assigned according to https://www.home-assistant.io/integrations/sensor.command_line/#unique_id.
What version of Home Assistant Core has the issue?
core-2022.6.7
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
Command line Sensor
Link to integration documentation on our website
https://www.home-assistant.io/integrations/sensor.command_line/#unique_id
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:598
Integration: Sensor (documentation, issues)
First occurred: 18:09:38 (24 occurrences)
Last logged: 18:10:36
Platform command_line does not generate unique IDs. ID 6f03a5d6-b32c-473d-a21b-69fd82ed4b4d already exists - ignoring sensor.statistics_devices_integration_shelly
Platform command_line does not generate unique IDs. ID b5b46f06-23ca-4a31-8b53-52e34d56aa67 already exists - ignoring sensor.statistics_devices_integration_mobileapp
Platform command_line does not generate unique IDs. ID a394d0b9-6e6a-4cc5-b65e-f0f8d807c70f already exists - ignoring sensor.statistics_devices_enabled
Platform command_line does not generate unique IDs. ID a70a1cb4-fbe0-4974-a355-bb0b777070e3 already exists - ignoring sensor.statistics_blueprints
Platform command_line does not generate unique IDs. ID 2af57d9b-f3cd-46fa-9aeb-ae5d046926b1 already exists - ignoring sensor.statistics_devices_integration_ipp
Additional information
https://community.home-assistant.io/t/platform-command-line-does-not-generate-unique-ids/474134
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 26 (16 by maintainers)
I just went through the manual migration process, and reloading the command line entities no longer generates warnings.
i can confirm, that reloading the command line entities does produce the
Platform command_line does not generate unique IDs.
error — if command line sensors are defined in packages. in addition i observed that reloading the command line entities sets the polling interval of command line sensors (that are defned in packages) to a few seconds. since i have one command line sensor that calls a script that is heavy on CPU usage, usally every 300 seconds. after reloading the command line entities this script is called every 2-5 seconds, which can only be mitigated by restarting home assistant. (ha core 2023.05.2)I’ll try to reproduce this week
I am seeing the same on 2022.11.1, I also have distinct unique IDs assigned to each sensor.
That makes the issue description more clear, thanks! 👍
Yes, I did provide them. E. g.
No, the same unique_id is not used more than once all over all my yaml files. Example:
So that’s the confusing part of these error messages. Only see those when manually reloading command line sensor entities, not after restarting HA.