Skip to content

q10: accept customized clean mode code 4#838

Merged
Lash-L merged 2 commits into
Python-roborock:mainfrom
lboue:q10-cleanmode-customized4
Jun 4, 2026
Merged

q10: accept customized clean mode code 4#838
Lash-L merged 2 commits into
Python-roborock:mainfrom
lboue:q10-cleanmode-customized4

Conversation

@lboue
Copy link
Copy Markdown
Contributor

@lboue lboue commented Jun 3, 2026

Summary

This change fixes Q10 status parsing for custom cleaning mode.

What was done

  • Added support for clean mode code 4 in the Q10 clean mode enum by introducing the CUSTOMIZED value.
  • Added/updated unit tests to verify:
    • Parsing from readable value customized
    • Parsing from numeric code 4

Why this was needed

  • Q10 devices can report dpCleanMode = 4 during room-based/customized cleaning.
  • Without this enum value, parsing raised a ValueError and produced conversion errors in logs.

@lboue lboue force-pushed the q10-cleanmode-customized4 branch from 8170dae to 38063f9 Compare June 3, 2026 19:49
@lboue lboue marked this pull request as ready for review June 3, 2026 19:50
Copilot AI review requested due to automatic review settings June 3, 2026 19:50
Copy link
Copy Markdown
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

Note

Copilot was unable to run its full agentic suite in this review.

Adds support for a Q10 “customized” cleaning mode by extending the YXCleanType mapping and validating it via tests.

Changes:

  • Extend YXCleanType with a new CUSTOMIZED value/code mapping ("customized", 4)
  • Update readable-value parameterization to include "customized"
  • Add a focused test to ensure from_code(4) resolves to CUSTOMIZED

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tests/data/test_code_mappings.py Adds coverage for the new "customized" readable value and the numeric mode code 4.
roborock/data/b01_q10/b01_q10_code_mappings.py Introduces YXCleanType.CUSTOMIZED mapped to code 4.

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

VAC_AND_MOP = "vac_and_mop", 1 # bothwork
VACUUM = "vacuum", 2 # onlysweep
MOP = "mop", 3 # onlymop
CUSTOMIZED = "customized", 4
@lboue lboue force-pushed the q10-cleanmode-customized4 branch from 9aae654 to a337555 Compare June 3, 2026 20:01
@Lash-L Lash-L merged commit b901fb8 into Python-roborock:main Jun 4, 2026
7 checks passed
@Lash-L
Copy link
Copy Markdown
Collaborator

Lash-L commented Jun 4, 2026

Thanks @lboue !

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.

3 participants