feat: update schema requirements in StatusV2 and Consumable#806
Merged
allenporter merged 4 commits intoPython-roborock:mainfrom Apr 5, 2026
Merged
feat: update schema requirements in StatusV2 and Consumable#806allenporter merged 4 commits intoPython-roborock:mainfrom
allenporter merged 4 commits intoPython-roborock:mainfrom
Conversation
Update the StatusV2 to check the schema for supported fields.
Contributor
There was a problem hiding this comment.
Pull request overview
Updates schema-based feature support detection for StatusV2 by marking additional StatusV2 fields with requires_schema_code metadata, and extends the device-features snapshot coverage accordingly.
Changes:
- Add
StatusField.ERROR_CODEand update snapshots to includeerror_codesupport. - Annotate several
StatusV2fields (e.g.,state,battery,error_code, etc.) withrequires_schema_codemetadata soDeviceFeaturesTrait.is_field_supported()can consult the product schema. - Minor test refactor to clarify the asserted mapping variable name.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
roborock/data/v1/v1_containers.py |
Adds StatusField.ERROR_CODE and schema-code metadata on StatusV2 fields to enable schema-driven support checks. |
tests/devices/traits/v1/test_device_features.py |
Renames the computed mapping variable for clarity (no behavior change). |
tests/devices/traits/v1/__snapshots__/test_device_features.ambr |
Updates expected supported-field snapshots to include error_code. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Lash-L
reviewed
Apr 4, 2026
…ma_code calls in v1_containers
Lash-L
approved these changes
Apr 5, 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.
Update the StatusV2 to check the schema for supported fields.