Skip to content

Conversation

@allenporter
Copy link
Contributor

@allenporter allenporter commented Dec 7, 2025

This is preparing for refactoring the conversion code and establishing the correct behavior for adding more tests for the new API.

Issue #623

This is preparing for refactoring the conversion code and establishing the correct behavior for adding more tests for the new API.
Copilot AI review requested due to automatic review settings December 7, 2025 17:43
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 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 False values 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.

@allenporter allenporter requested a review from Lash-L December 7, 2025 18:02
@allenporter allenporter merged commit 4bd9b18 into Python-roborock:main Dec 7, 2025
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.

2 participants