Repository navigation
Link Poolside pool devices to the controller by device id - #2
Open
jaltmayerpizzorno wants to merge 1 commit into
Open
jaltmayerpizzorno wants to merge 1 commit into
jaltmayerpizzorno wants to merge 1 commit into
Conversation
device_registry.async_get_or_create's via_device (an identifier tuple) is deprecated and stops working in Home Assistant 2027.8; current releases already log a warning for it. Register the controller first and pass its device id as via_device_id instead. Test first: a new test checks the pool devices are registered with the controller's via_device_id and without via_device; it failed before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What
This links the pool devices (pump, heat pump, thermistors, …) to the controller device by its device id (
via_device_id), instead of by identifier (via_device).Why
device_registry.async_get_or_create'svia_deviceparameter is deprecated and stops working in Home Assistant 2027.8. Current releases already log it at startup:Change
_async_register_devicesalready registers the controller hub first. It now keeps the returned device and passesvia_device_id=hub.idfor each pool device.Tests
test_pool_devices_linked_by_device_idchecks that the pool devices are registered with the controller'svia_device_idand withoutvia_device. It failed before the change. The existingtest_pool_device_registered_under_controllerstill passes. All Poolside tests pass, and ruff, mypy and hassfest are clean.The same change is in PoolsideStan/poolside-official-integration#6 for the custom component.
🤖 Generated with Claude Code