Harmonizes Q10 status names in python-roborock to canonical values instead of legacy *state strings#793
Merged
allenporter merged 4 commits intoPython-roborock:mainfrom Mar 22, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR standardizes B01 Q10 device status naming by updating YXDeviceState enum string values from legacy *state labels to canonical state names, aligning Q10 status reporting with the rest of the integration.
Changes:
- Updated
YXDeviceStatestring values to canonical names (e.g.,sleeping,standby,going_to_charge,remote_control,updating). - Added
faultDPS mapping toQ10Statusand asserted it in the existing Q10 status trait refresh test. - Added a dedicated container test file to lock in canonical enum values and code-to-enum mapping.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
roborock/data/b01_q10/b01_q10_code_mappings.py |
Renames Q10 YXDeviceState enum string values to canonical names. |
roborock/data/b01_q10/b01_q10_containers.py |
Adds fault field to Q10Status mapped to B01_Q10_DP.FAULT. |
tests/devices/traits/b01/q10/test_status.py |
Extends existing status refresh test coverage to include fault. |
tests/data/b01_q10/test_b01_q10_containers.py |
New tests asserting canonical enum values and from_code() behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
6359df8 to
7fddf43
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9 tasks
allenporter
requested changes
Mar 21, 2026
allenporter
approved these changes
Mar 22, 2026
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.
Proposed change
This PR harmonizes Q10 status names in
python-roborockto canonical values instead of legacy*statestrings.What changed
YXDeviceStatevalues to align with the naming used across the integration:sleepstate→sleepingstandbystate→standbytochargestate→going_to_chargeremoteingstate→remote_controlpausestate→pausedfaultstate→faultcreatingmapstate→creating_mapmapsavestate→saving_maprelocationstate→relocatingrobotsweeping→sweepingrobotmoping→moppingrobotsweepandmoping→sweep_and_moprobottransitioning→transitioningrobotwaitcharge→waiting_to_chargecleaningstate→cleaningchargingstate→chargingupgradestate→updatingWhy
Tests
.venv/bin/pytest test_b01_q10_containers.py test_code_mappings.py -q24 passed.Notes