New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix device sync to Google Assistant if Matter integration is active #104796
Conversation
Hey there @home-assistant/cloud, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Hey there @home-assistant/matter, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed that we need to update this test too:
core/tests/components/matter/test_helpers.py
Lines 64 to 73 in 1ab9357
await get_node_from_device_entry(hass, other_device_entry) | |
assert f"Device {other_device_entry.id} is not a Matter device" in str( | |
value_error.value | |
) | |
matter_client.server_info = None | |
with pytest.raises(RuntimeError) as runtime_error: | |
node_from_device_entry = await get_node_from_device_entry(hass, device_entry) |
The function isn't a coroutine function anymore since a while. And it doesn't raise ValueError now.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
…104796) * Only get Matter device info if device is an actual Matter device * Return None if matter device does not exist * lint * fix test * adjust google assistant test
Proposed change
To deduplicate devices on Google Home if both HA and Google Home have the same device in their Matter fabric, some logic was added to Home Assistant to pass Matter specific id's to Google Assistant.
This logic was however called for non-Matter devices as well and instead of returning None if a device was non-existing, the Matter integration was (unexpectedly) raising a ValueError. Result was that non-matter devices would no longer be synced with Google Assistant if a user has the Matter integration installed.
This patches this issue for now, while we think of a more robust callback-like solution in the future;
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
..coveragerc
.To help with the load of incoming pull requests: