fix: add missing DPS fields to Q10Status and fix CLEAN_PROGRESS mapping#791
Merged
allenporter merged 2 commits intoPython-roborock:mainfrom Mar 21, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes B01 Q10 status DPS mappings so additional device status datapoints are no longer silently dropped, and corrects the cleaning progress datapoint mapping.
Changes:
- Add missing DPS-mapped fields to
Q10Status(totals + consumable life values). - Fix
cleaning_progressto map toB01_Q10_DP.CLEAN_PROGRESS. - Extend the Q10 status trait refresh test to assert the new fields are populated from a device response.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
roborock/data/b01_q10/b01_q10_containers.py |
Extends Q10Status DPS field coverage and corrects the cleaning progress DPS mapping. |
tests/devices/traits/b01/q10/test_status.py |
Adds assertions verifying the new status fields are None before refresh and correctly set after processing the response. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9 tasks
allenporter
approved these changes
Mar 21, 2026
Contributor
allenporter
left a comment
There was a problem hiding this comment.
Seems good. I think we may want to have things like brush life in a different trait (e.g. so we can reset consumables) but this is obviously the simplest API for now.
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.
Fix: Q10 Status DPS Mapping (
fix/q10-status-dps-mapping)Problem
The
Q10Statusdataclass was missing several DPS-mapped fields and had an incorrect enum reference (B01_Q10_DP.CLEANING_PROGRESSinstead ofB01_Q10_DP.CLEAN_PROGRESS), causing device data to be silently dropped when updating status from raw device responses.Changes
Q10Status(total_clean_area,total_clean_count,total_clean_time,main_brush_life,side_brush_life,filter_life,sensor_life)cleaning_progressfield to use the correctB01_Q10_DP.CLEAN_PROGRESSenum value.test_status_trait_refreshto assert the new fields areNonebefore refresh and hold the expected values after the device response is processed.Tests
All 4 tests pass:
test_status_trait_streaming,test_status_trait_refresh,test_status_trait_update_listener,test_status_trait_update_listener_ignores_value.