Skip to content

Link pool devices to the controller by device id - #6

Open
jaltmayerpizzorno wants to merge 1 commit into
PoolsideStan:mainfrom
jaltmayerpizzorno:via-device-id
Open

jaltmayerpizzorno wants to merge 1 commit into
PoolsideStan:mainfrom
jaltmayerpizzorno:via-device-id

Conversation

@jaltmayerpizzorno

Copy link
Copy Markdown
Contributor

What

This links the pool devices to the controller device by its device id (via_device_id) instead of by identifier (via_device).

Why

via_device is deprecated and stops working in Home Assistant 2027.8. Current releases already log a warning at startup ("calls device_registry.async_get_or_create with a deprecated via_device parameter").

Change

It's a three-line change in _async_register_devices: the controller hub is already registered first, and its device id is now passed as via_device_id.

It's the same change as in the core branch (PoolsideStan/home-assistant-core#2), which has a test for it. I've also been running it on my own controller: the warning is gone and the devices are still grouped under the controller.

🤖 Generated with Claude Code

device_registry.async_get_or_create's via_device is deprecated and stops
working in Home Assistant 2027.8 (current releases log a warning). Register
the controller first and pass its device id as via_device_id instead.

Same change as in the core branch, where it is tested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant