thomluther / ha-anker-solix

Home Assistant integration for Anker Solix Power devices
MIT License
294 stars 4 forks source link

Löschen von Entitäten und Geräten nach ändern oder löschen von Jenen auf der Anker App nicht mehr möglich #118

Closed manuelkellauer closed 2 months ago

manuelkellauer commented 2 months ago

System Health details

System Information

version core-2024.8.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.4
os_name Linux
os_version 6.6.46-haos
arch x86_64
timezone Europe/Vienna
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok HACS Data | ok GitHub API Calls Remaining | 4987 Installed Version | 2.0.0 Stage | running Available Repositories | 1389 Downloaded Repositories | 6
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 13.1 -- | -- update_channel | stable supervisor_version | supervisor-2024.08.0 agent_version | 1.6.0 docker_version | 26.1.4 disk_total | 30.8 GB disk_used | 5.6 GB healthy | true supported | true host_connectivity | true supervisor_connectivity | true ntp_synchronized | true virtualization | kvm board | ova supervisor_api | ok version_api | ok installed_addons | Advanced SSH & Web Terminal (18.0.0), File editor (5.8.0), Cloudflared (5.1.19)
Dashboards dashboards | 4 -- | -- resources | 0 views | 3 mode | storage
Recorder oldest_recorder_run | 27. August 2024 um 13:52 -- | -- current_recorder_run | 1. September 2024 um 20:07 estimated_db_size | 26.06 MiB database_engine | sqlite database_version | 3.45.3

Integration version

2.1.1

Checklist

Describe the issue

Durch Änderung der Komponenten im Anker App (Nahmens Änderung, Änderung der Zuweisung von Besitzer,...) lassen sich im Nachhinein die Geräte und Entitäten zwar deaktivieren aber nicht löschen. Es werden lediglich die neuen Geräte Entitäten zusätzlich angelegt.

Reproduction steps

  1. Es wurden alle Geräte aus der Anker App gelöscht
  2. Diese wurden wieder neu verbunden und wieder eingefügt
  3. Namen wurden nicht wie zuvor vergeben
  4. Powerbank, Smartmeter, so wie 5 Smart Plugs wurden wieder in Betrieb genommen Folge - es wurden Alles zweimal angelegt nur mit neuen Namen und wie Ausgangsleistung der Smart Plugs werden auch nicht mehr angezeit. ...

Debug logs

2024-09-01 21:25:11.369 WARNING (SyncWorker_0) [homeassistant.util.yaml.loader] YAML file /config/configuration.yaml contains duplicate key "logger". Check lines 53 and 56
2024-09-01 21:25:11.369 WARNING (SyncWorker_0) [homeassistant.util.yaml.loader] YAML file /config/configuration.yaml contains duplicate key "logger". Check lines 56 and 63
2024-09-01 21:25:11.425 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-09-01 21:25:11.426 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration powercalc which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-09-01 21:25:11.427 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hoymiles_wifi which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-09-01 21:25:11.427 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration openweathermaphistory which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-09-01 21:25:11.428 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration watchman which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-09-01 21:25:11.428 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration npm_switches which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-09-01 21:25:11.429 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration anker_solix which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

Diagnostics dump

Bildschirmfoto 2024-09-01 um 21 59 27

thomluther commented 2 months ago

Please communicate in English in the repo, not everybody will be able to understand what you want to report. When you change alias names of your devices, then they may get different entity names from core, even if their unique_id remains the same (its based on SN). The same may happen if you switch HA to another language, since the entity name is translated for the automated entity_id creation. Devices cannot be deleted either as long as there are still active entities used by the device. You should however be able to delete individual entities in their details if they are no longer provided by the integration. Optionally you need to force an unregistration of all your devices and re-register only the entities that are still provided. You can do this by deleting your configuration entry and recreating it again, or you go to the new reconfigure option of your entry and confirm the dialog with the same account information. This will also enforce unregistration off all devices found for that entry, including all their assigned entities. They will be re-registered from the actual response of the api and therefore the old entity_ids should not re-appear.