Simplify collision handling - #179005
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Simplifies device-registry collision handling introduced for child devices in #178666.
Changes:
- Always rejects main-device identifier collisions with child devices.
- Rejects registrations spanning multiple child devices.
- Updates collision tests for stale and connection-bearing devices.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
homeassistant/helpers/device_registry.py |
Simplifies and strengthens child-device collision validation. |
tests/helpers/test_device_registry.py |
Updates and expands collision behavior coverage. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
emontnemery
reviewed
Aug 13, 2026
emontnemery
left a comment
Contributor
There was a problem hiding this comment.
Looks good, some minor adjustments
emontnemery
reviewed
Aug 13, 2026
emontnemery
approved these changes
Aug 13, 2026
emontnemery
left a comment
Contributor
There was a problem hiding this comment.
LGTM, nice cleanup 👍
Member
|
I don't think we want to merge the Add child devices PR implicitly. Stacked PRs working like this doesn't seem wanted. |
MartinHjelmare
marked this pull request as draft
August 13, 2026 10:20
MartinHjelmare
requested changes
Aug 13, 2026
emontnemery
reviewed
Aug 13, 2026
emontnemery
requested review from
a team,
Adminiuga,
TheJulianJES,
dmulcahey and
puddly
as code owners
August 13, 2026 11:11
emontnemery
removed request for
a team,
Adminiuga,
Ernst79,
Jc2k,
Kane610,
Shulyaka,
StevenLooman,
TheJulianJES,
andrewsayre,
bachya,
bdraco,
cgtobi,
dgomes,
dmulcahey,
erwindouna,
iMicknl,
joostlek,
jpbede,
karwosts,
marcelveldt,
puddly,
starkillerOG,
synesthesiam and
thecode
August 13, 2026 11:52
Co-authored-by: Erik Montnemery <erik@montnemery.com>
21 tasks
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
Simplify collision handling for #178666.
Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: