Update zone ID on config subentry rename#29
Draft
lnagel wants to merge 1 commit into
Draft
Conversation
bfd9251 to
e6de840
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #29 +/- ##
==========================================
+ Coverage 95.01% 95.09% +0.08%
==========================================
Files 20 20
Lines 1645 1673 +28
Branches 251 258 +7
==========================================
+ Hits 1563 1591 +28
Misses 45 45
Partials 37 37
|
e6de840 to
b26a4db
Compare
When a zone subentry is renamed using Home Assistant's native rename action, detect the rename by comparing subentry.title with stored name and migrate: - Entity unique_ids in the entity registry - Device identifiers in the device registry - Subentry data (id and name fields)
b26a4db to
4448acc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a zone config subentry is renamed via Home Assistant's native rename action, this change ensures:
The migration is performed during entry setup by comparing subentry.title with subentry.data["name"]. If they differ, the zone was renamed and migration is triggered.
Includes comprehensive tests for: