Use feature_priority for update entities#684
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #684 +/- ##
=======================================
Coverage 97.51% 97.51%
=======================================
Files 62 62
Lines 10949 10950 +1
=======================================
+ Hits 10677 10678 +1
Misses 272 272 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
puddly
approved these changes
Feb 27, 2026
Contributor
puddly
left a comment
There was a problem hiding this comment.
Looks good to me. I wonder: does the zigpy side even work with a server-side OTA cluster? I think both were kept because discovery in the past didn't really differentiate between the two.
Contributor
Author
|
Hmm, no idea. We reintroduced that swapped direction matching, so I guess it should..? |
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.
Proposed change
This introduces
feature_priorityfor update entities.Currently, there's an issue where both the update entity for the client OTA cluster and the one for the server OTA cluster are discovered. If there's both an
inandoutOTA cluster present on a device (endpoint), theunique_idwill conflict, with no warnings logged. The client OTA entity class indirectly takes precedence due to definition order.This PR changes that to have only one entity be truly discovered, making the priority more explicit: client, then server.
For all affected devices in our diagnostics, see: #683
Additional information
Note: We can also prefer the server OTA entity if that's better, without causing breaking changes in HA. The
unique_idstays the same after all. But I don't know which one actually works on these devices. Client is generally the way to do it.