chore: Add more test coverage for a01 API and fix False value handling#648
Merged
allenporter merged 2 commits intoPython-roborock:mainfrom Dec 7, 2025
Merged
Conversation
This is preparing for refactoring the conversion code and establishing the correct behavior for adding more tests for the new API.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances test coverage for the a01 API and fixes a critical bug where False boolean values were incorrectly filtered out during value conversion. The fix changes the condition from checking truthiness to explicitly checking for None, allowing False values to be properly processed.
- Fixes bug where
Falsevalues from boolean converters were incorrectly discarded - Adds comprehensive test coverage for both Zeo (washing machine) and Dyad (wet/dry vacuum) protocols
- Parameterizes test fixtures to support testing multiple device categories
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/test_a01_api.py | Adds parameterized fixtures and two comprehensive test cases (test_update_zeo_values and test_update_dyad_values) to verify correct handling of various data types including boolean False, zero integers, and protocol-specific conversions |
| roborock/version_a01_apis/roborock_client_a01.py | Fixes critical bug by changing condition from if converted_response: to if converted_response is not None:, allowing False boolean values to be properly processed instead of being filtered out |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Lash-L
approved these changes
Dec 7, 2025
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.
This is preparing for refactoring the conversion code and establishing the correct behavior for adding more tests for the new API.
Issue #623