-
Notifications
You must be signed in to change notification settings - Fork 61
feat: add clean route and repeat for q7 #756
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
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 adds support for two new cleaning features for the Roborock Q7 (B01) device: cleaning path preference (route) and cleaning repeat cycles. It changes the CleanRepeatMapping enum from using ONCE/TWICE to ONE/TWO, and introduces a new CleanPathPreferenceMapping enum to control the cleaning route strategy.
Changes:
- Renamed
CleanRepeatMappingenum values fromONCE/TWICEtoONE/TWOand addedCleanPathPreferenceMappingenum withBALANCED/DEEPoptions - Changed
repeat_stateandclean_path_preferencefields from raw integers to typed enums inB01Propswith corresponding property accessors - Added
set_clean_path_preferenceandset_repeat_statemethods to the Q7 properties API for controlling these settings
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| roborock/data/b01_q7/b01_q7_code_mappings.py | Renamed CleanRepeatMapping enum values and added new CleanPathPreferenceMapping enum |
| roborock/data/b01_q7/b01_q7_containers.py | Changed field types to use enums instead of int, added property methods for name accessors |
| roborock/devices/traits/b01/q7/init.py | Added setter methods for the new cleaning path preference and repeat state features |
| tests/data/b01_q7/test_b01_q7_containers.py | Added assertions to verify deserialization and property methods for the new fields |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| async def set_clean_path_preference(self, preference: CleanPathPreferenceMapping) -> None: | ||
| """Set the cleaning path preference (route).""" | ||
| await self.set_prop(RoborockB01Props.CLEAN_PATH_PREFERENCE, preference.code) | ||
|
|
||
| async def set_repeat_state(self, repeat: CleanRepeatMapping) -> None: | ||
| """Set the cleaning repeat state (cycles).""" | ||
| await self.set_prop(RoborockB01Props.REPEAT_STATE, repeat.code) |
Copilot
AI
Jan 28, 2026
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.
The new methods set_clean_path_preference and set_repeat_state lack test coverage. Similar setter methods in this file (e.g., set_fan_speed, set_water_level, set_mode) have corresponding tests in tests/devices/traits/b01/q7/test_init.py. Consider adding tests for these new methods to maintain consistent test coverage across the API.
No description provided.