Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to delete non existing sensors ... are the no UUIDs defined for the sensors? #339

Open
chichi1967 opened this issue Oct 3, 2024 · 4 comments

Comments

@chichi1967
Copy link

I have now the 3rd time the issue that I get all sensors of 5 devices (115!) with _2 as extension and all without _2 are listed as not existing anymore, but I cannot delete them from the gui as HA is missing a unique ID (UUID).
If this is true is it possible to create a UUID for each sensor when it is created?

@gcobb321
Copy link
Owner

gcobb321 commented Oct 3, 2024

The sensor has a Unique ID when it is created by iCloud3 (devicename_sensor.name)

Here is my entry in the entity registry (config/.storage.core.entity_registry):

        "aliases": [],
        "area_id": null,
        "categories": {},
        "capabilities": null,
        "config_entry_id": "01J4Y63PB7D1941MHC6M2GVK95",
        "created_at": "1970-01-01T00:00:00+00:00",
        "device_class": null,
        "device_id": "f94061492855ab63f03e50163cce4eb0",
        "disabled_by": null,
        "entity_category": null,
        "entity_id": "sensor.gary_iphone_home_distance",
        "hidden_by": null,
        "icon": null,
        "id": "1c0f1a1998cddb9f78da267a2aa82e1f",
        "has_entity_name": false,
        "labels": [],
        "modified_at": "2024-08-10T13:02:15.745520+00:00",
        "name": null,
        "options": {},
        "original_device_class": null,
        "original_icon": "mdi:map-marker-distance",
        "original_name": "Gary HomeDistance",
        "platform": "icloud3",
        "supported_features": 0,
        "translation_key": null,
        "unique_id": "icloud3_gary_iphone_home_distance",
        "previous_unique_id": null,
        "unit_of_measurement": null
      },

I think the the problem is when HA recreates the entities (and I do not know why it does this), HA does not create the Unique ID. I will see if there is a way to go back through the entity registry and rename them back to what they were originally. Can you send your _config/.storage/core.entity_registry and core.device_registry to geekstergary@gmail.com and reference this issue. Then I will be able to see the before and after and maybe able to come up with an easy way to scan the registries and put thing back the way they were.

@chichi1967
Copy link
Author

Thanks for checking in to this one ... as I was not even able to use purge to get rid of these entitities I restored the backup from 3 hours ago (update HA to newest version) as this was the easiest way to fix it.
As I didn't create a backup before restoring I have no chance to send these data - sorry.

But another question - is it possible that this happened due to reloading of the icloud app via the gui instead from inside the integration? As my new phone that didn't show up even after 10 minutes I restarted the integration from the HA gui and I think this was quite close to the point were the trouble started.

@gcobb321
Copy link
Owner

gcobb321 commented Oct 3, 2024

It could be. When it reloaded, HA would see the entities already exist and create new ones. I have removed the reload from the Configure > Actions already for other reliability reasons.

@gcobb321
Copy link
Owner

gcobb321 commented Nov 8, 2024

Closed with the v3.1.1 Release. Create a new issue if you continue to experience this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants