Skip to content

feat: update schema requirements in StatusV2 and Consumable#806

Merged
allenporter merged 4 commits intoPython-roborock:mainfrom
allenporter:v1-trait-support
Apr 5, 2026
Merged

feat: update schema requirements in StatusV2 and Consumable#806
allenporter merged 4 commits intoPython-roborock:mainfrom
allenporter:v1-trait-support

Conversation

@allenporter
Copy link
Copy Markdown
Contributor

Update the StatusV2 to check the schema for supported fields.

Update the StatusV2 to check the schema for supported fields.
Copilot AI review requested due to automatic review settings April 4, 2026 08: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

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_CODE and update snapshots to include error_code support.
  • Annotate several StatusV2 fields (e.g., state, battery, error_code, etc.) with requires_schema_code metadata so DeviceFeaturesTrait.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
Lash-L previously approved these changes Apr 4, 2026
Copy link
Copy Markdown
Collaborator

@Lash-L Lash-L left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one nit

@allenporter allenporter changed the title feat: update schema requirements in StatusV2 feat: update schema requirements in StatusV2 and Consumable Apr 5, 2026
@allenporter allenporter merged commit e6f20cc into Python-roborock:main Apr 5, 2026
7 checks passed
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