-
-
Notifications
You must be signed in to change notification settings - Fork 36.3k
Improve Roborock exception logging behavior for Zeo/Dyad devices #158465
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
Conversation
Update the coordinator to catch the integration library specific exceptions and raise UpdateFailed to reduce exceptions in the log message
|
Hey there @Lash-L, 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.
Pull request overview
This PR improves exception handling for Roborock Zeo (washing machine) and Dyad (wet dry vacuum) devices by catching library-specific RoborockException and raising UpdateFailed exceptions with translation keys. This prevents raw exceptions from appearing in logs and provides better user-facing error messages.
Key Changes
- Added try-catch blocks in both
RoborockWashingMachineUpdateCoordinatorandRoborockWetDryVacUpdateCoordinatorto catchRoborockExceptionand raiseUpdateFailedwith proper translation keys - Added comprehensive test coverage for failure scenarios in both Zeo and Dyad device setup
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
homeassistant/components/roborock/coordinator.py |
Added exception handling in _async_update_data methods for both washing machine and wet dry vac coordinators, following the same pattern used in the main vacuum coordinator |
tests/components/roborock/test_init.py |
Added two new tests to verify that when Zeo or Dyad devices fail during setup, the integration still loads successfully and excludes the failed device from the device registry |
Co-authored-by: Copilot <[email protected]>
…8465) Co-authored-by: Copilot <[email protected]>
Proposed change
Update the coordinator to catch the integration library specific exceptions and raise UpdateFailed to reduce exceptions in the log message
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: