Skip to content

Conversation

@Lash-L
Copy link
Collaborator

@Lash-L Lash-L commented Jan 28, 2026

No description provided.

@codecov
Copy link

codecov bot commented Jan 28, 2026

Codecov Report

❌ Patch coverage is 90.47619% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
roborock/devices/traits/b01/q7/__init__.py 50.00% 2 Missing ⚠️
Files with missing lines Coverage Δ
roborock/data/b01_q7/b01_q7_code_mappings.py 100.00% <100.00%> (ø)
roborock/data/b01_q7/b01_q7_containers.py 86.89% <100.00%> (+0.56%) ⬆️
tests/data/b01_q7/test_b01_q7_containers.py 100.00% <100.00%> (ø)
roborock/devices/traits/b01/q7/__init__.py 90.90% <50.00%> (-4.10%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

Copilot AI left a 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 CleanRepeatMapping enum values from ONCE/TWICE to ONE/TWO and added CleanPathPreferenceMapping enum with BALANCED/DEEP options
  • Changed repeat_state and clean_path_preference fields from raw integers to typed enums in B01Props with corresponding property accessors
  • Added set_clean_path_preference and set_repeat_state methods 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.

Comment on lines +64 to +70
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)
Copy link

Copilot AI Jan 28, 2026

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.

Copilot uses AI. Check for mistakes.
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.

2 participants