Skip to content

Conversation

@Lash-L
Copy link
Collaborator

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

Q7 mode is interesting and a bit different than V1. You must explicitly set what mode you want to be in otherwise it will not work. You can change the mop mode while in vacuum mode, but it wont actually mop unless you change the mode.

Relates: #739

@codecov
Copy link

codecov bot commented Jan 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
roborock/data/b01_q7/b01_q7_containers.py 86.33% <100.00%> (ø)
roborock/devices/traits/b01/q7/__init__.py 95.00% <100.00%> (+0.26%) ⬆️
tests/devices/traits/b01/q7/test_init.py 100.00% <100.00%> (ø)
🚀 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 the ability to set the cleaning mode (vacuum, mop, or both) for the Roborock Q7 device, addressing the Q7's requirement to explicitly set the cleaning mode before it will function properly.

Changes:

  • Added set_mode API method to control Q7 cleaning mode
  • Changed water and mode fields in B01Props from int to proper enum types for improved type safety
  • Added comprehensive test coverage for the new mode-setting functionality

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
tests/devices/traits/b01/q7/test_init.py Added parametrized test for set_mode method covering all three cleaning modes (vacuum, mop, vac_and_mop)
roborock/devices/traits/b01/q7/init.py Implemented set_mode method following the existing pattern for property setters
roborock/data/b01_q7/b01_q7_containers.py Changed water and mode fields from int to enum types (WaterLevelMapping and CleanTypeMapping) for better type safety

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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