Conversation
Codecov Report❌ Patch coverage is
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds stronger support for mop washing functionality by introducing the ability to set wash towel mode, start a mop wash, and stop a mop wash. The changes migrate from the deprecated RoborockDockWashTowelModeCode enum to the new WashTowelModes enum and implement dynamic mode determination based on device features, mirroring the approach from PR #611.
Changes:
- Added methods to set wash towel mode, start wash, and stop wash in the
WashTowelModeTrait - Migrated from
RoborockDockWashTowelModeCodetoWashTowelModesenum with dynamic mode support - Introduced
wash_towel_mode_optionsproperty that returns valid modes based on device capabilities
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
roborock/devices/traits/v1/wash_towel_mode.py |
Added __init__, wash_towel_mode_options property, and methods for set_wash_towel_mode, start_wash, and stop_wash |
roborock/devices/traits/v1/__init__.py |
Moved device_features initialization before other traits and added special initialization for WashTowelModeTrait |
roborock/data/v1/v1_containers.py |
Updated WashTowelMode dataclass to use WashTowelModes instead of RoborockDockWashTowelModeCode |
roborock/data/v1/v1_code_mappings.py |
Removed deprecated RoborockDockWashTowelModeCode enum |
tests/devices/traits/v1/test_wash_towel_mode.py |
Updated tests to use WashTowelModes, added comprehensive tests for new methods and mode options |
tests/devices/traits/v1/fixtures.py |
Reset mock side_effect to None after feature discovery |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.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.
This adds the ability to set the wash towel mode (aka mop cleaning mode), start a clean and stop a clean.
The logic for grabbing out valid options mirrors this: #611