Closed edmund-1 closed 2 months ago
Which version of Powercalc are you using? There was a similar bug reported some time ago, I think a month / 2 months ago. But this issue should be fixed. Let's first check if you are on the latest version? Otherwise we'll need to investigate further.
I am on the latest build, isn't it?
Yes you are on the latest. You are sure there are still new entries added? Could also be an old issue. Powercalc does not automatically clear it up, as HA raises an error when I try that. I can instruct you how to clean it up, but let's first validate if there are no new entries added anymore.
How can I check if new entries are added?
They are added. sensor.livingroom_lights_power_131 was created yesterday at 3:00 (UTC+3)/ At that time I rebooted the HA hardware
So, it makes sense to clean them up.
They are added. sensor.livingroom_lights_power_131 was created yesterday at 3:00 (UTC+3)/ At that time I rebooted the HA hardware
Hmm ok, that a pitty, was pretty sure the actual issue was solved but apparantly it still persists.
Could you provide diagnostics of this config entry? You can do by clicking three dots next to Configure
and next click Download diagnostics
.
Things can be cleaned up by editing config/.storage/core.config_entries
file. Make sure to make a backup before you edit.
You can remove all the duplicate entries from the JSON file and restart afterwards.
They are added. sensor.livingroom_lights_power_131 was created yesterday at 3:00 (UTC+3)/ At that time I rebooted the HA hardware
Hmm ok, that a pitty, was pretty sure the actual issue was solved but apparantly it still persists. Could you provide diagnostics of this config entry? You can do by clicking three dots next to
Configure
and next clickDownload diagnostics
.Things can be cleaned up by editing
config/.storage/core.config_entries
file. Make sure to make a backup before you edit. You can remove all the duplicate entries from the JSON file and restart afterwards.
I have 4 lights in Livingroom (group) and 2 in Bedroom (group). You have all the lights and the first group from each room. As a sidenote, the groups are created automatically, the devices remain the same.
I will let you know the output after the cleaning up procedure.
Powercalc does a check if config entry with certain unique_id already exists before attempting to create a new one:
Looking at your diagnostics of the Livingroom Lights
config entry I see unique_id is set, but apparently powercalc thinks there is no config entry yet. There must be some flaw in the logic.
Could you please also check if unique_id is set for the duplicate entries? Either by looking at diagnostics JSON or directly in config/.storage/core.config_entries
?
After cleaning config/.storage/core.config_entries
file and deleting 1040 entities and entries in db for those entities, the integration is clean. Hopefully, it will remain that way :)
I would wait a couple more days to be sure the issue was fixed before closing the issue.
Thank you @bramstroker for your quick response, fix and support.
@edmund-1 glad its resolved for you. Did it stay clean or were new duplicates created again after new restarts?
System Health details
System Information
Home Assistant Community Store
GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4982 Installed Version | 1.34.0 Stage | running Available Repositories | 1460 Downloaded Repositories | 40 HACS Data | okHome Assistant Cloud
logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | okHome Assistant Supervisor
host_os | Home Assistant OS 12.4 -- | -- update_channel | stable supervisor_version | supervisor-2024.06.2 agent_version | 1.6.0 docker_version | 26.1.4 disk_total | 57.8 GB disk_used | 16.7 GB healthy | true supported | true host_connectivity | true supervisor_connectivity | true ntp_synchronized | true virtualization | board | rpi5-64 supervisor_api | ok version_api | ok installed_addons | File editor (5.8.0), Home Assistant Google Drive Backup (0.112.1), Duck DNS (1.18.0), Let's Encrypt (5.0.25), Samba share (12.3.1), Studio Code Server (5.15.0), Advanced SSH & Web Terminal (18.0.0)Dashboards
dashboards | 3 -- | -- resources | 28 views | 15 mode | storageRecorder
oldest_recorder_run | July 19, 2024 at 06:17 -- | -- current_recorder_run | July 28, 2024 at 22:02 estimated_db_size | 986.04 MiB database_engine | sqlite database_version | 3.45.3Checklist
Describe the issue
Why Powercalc is creating so many entities?
In integrations there are approx 130 times the group Bedroom and LivingRoom. Kitchen speaker has no issues
Reproduction steps
Debug logs
Diagnostics dump or YAML config
No response