-
Notifications
You must be signed in to change notification settings - Fork 45
Allow device cluster entities overwrite from v2 quirks #328
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
Conversation
6c1801c
to
7a78bc9
Compare
<endpoint unique id>-<cluster id>-<suffix> Keep track of previous unique id inside BaseEntityInfo to allow home assistant zha component to migrate existing entities.
7a78bc9
to
b9af6d2
Compare
@mrrstux I'm going to pick this PR up to rebase it on top of |
@puddly Yes, by all means, please take it over! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #328 +/- ##
==========================================
- Coverage 96.70% 96.70% -0.01%
==========================================
Files 61 61
Lines 9874 9897 +23
==========================================
+ Hits 9549 9571 +22
- Misses 325 326 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
I think this PR is ready to go for the upcoming beta. This will affect every ZHA entity in Home Assistant so I think the Home Assistant side of this change needs a bit of a rework and to pre-compute the migration in order to perform it pseudo-atomically. |
I've scaled back the changes in this PR to not perform any migrations: it only affects the way entities are created and adds a new attribute to entity info to hold migrations. The format for it is provisional and likely will change (likely to include a version prefix for performance reasons?). |
Entities created by a v2 quirk should be allowed to overwrite any default generated ones.
Current patch harmonizes entities unique ids format across the component. It requires HA entities unique id migration code.
Fixes home-assistant/core#128253.