Skip to content

Conversation

@allenporter
Copy link
Contributor

Add the home data API product info and device info for a Saros 10R, captured from diagnostics.

Some followup up considerations:

  • This is building a parallel world to device_info.yaml so we may want to converge these (e.g. allow either diagnostic or CLI based contributions in the same format)
  • The product naming is not very readable since its using the model name which may be hard to read, so we can consider renaming the files.

Add the home data API product info and device info for a Saros 10R, captured from diagnostics.

Some followup up considerations:
- This is building a parallel world to device_info.yaml so we may want to converge these (e.g. allow either diagnostic or CLI based contributions in the same format)
- The product naming is not very readable since its using the model name which may be hard to read, so we can consider renaming the files.
Copy link
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.

lint is failing

Copilot AI review requested due to automatic review settings January 7, 2026 03:24
@allenporter
Copy link
Contributor Author

lint is failing

Fixed.

Copy link
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

This PR adds test data for the Saros 10R robot vacuum by introducing API response data captured from diagnostics. The changes include new JSON files containing product and device information, along with refactored data loading logic in the test suite.

Key Changes:

  • Added product schema and device status data for Saros 10R (model a144)
  • Refactored test data loading to use glob patterns with dictionary comprehension for all product and device JSON files
  • Created new constants for accessing Saros 10R test data

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
tests/testdata/home_data_product_a114.json Adds product schema definition for Saros 10R including capability codes and property definitions
tests/testdata/home_data_device_saros_10r.json Adds device information and status data for a Saros 10R test instance
tests/mock_data.py Refactors data loading to use glob patterns and adds constants for Saros 10R test data

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

Comment on lines +1 to +4
{
"id": "product-saros-10r",
"name": "Saros 10R",
"model": "roborock.vacuum.a144",
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

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

The filename uses 'a114' but the model inside the file is 'roborock.vacuum.a144'. The filename should be 'home_data_product_a144.json' to match the actual model number. This is confirmed by the codebase which defines ROBOROCK_SAROS_10R as 'roborock.vacuum.a144' in roborock/const.py and maps it to short model 'a144' in roborock/data/code_mappings.py.

Copilot uses AI. Check for mistakes.
A27_PRODUCT_DATA = PRODUCTS["home_data_product_a27.json"]
SS07_PRODUCT_DATA = PRODUCTS["home_data_product_ss07.json"]
A102_PRODUCT_DATA = PRODUCTS["home_data_product_a102.json"]
A114_PRODUCT_DATA = PRODUCTS["home_data_product_a114.json"]
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

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

Both the variable name 'A114_PRODUCT_DATA' and the file reference 'home_data_product_a114.json' should use 'a144' instead of 'a114' to match the actual model number (roborock.vacuum.a144) of the Saros 10R device as defined in the codebase. This maintains consistency with the naming pattern used for other product data variables (e.g., A27_PRODUCT_DATA for model a27).

Suggested change
A114_PRODUCT_DATA = PRODUCTS["home_data_product_a114.json"]
A144_PRODUCT_DATA = PRODUCTS["home_data_product_a144.json"]

Copilot uses AI. Check for mistakes.
@allenporter allenporter merged commit fafc8d8 into Python-roborock:main Jan 7, 2026
13 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.

2 participants