Skip to content

Add washing as valid state to cleanInfo#1014

Merged
edenhaus merged 1 commit into
devfrom
fix-cleaninfo
Jun 10, 2025
Merged

Add washing as valid state to cleanInfo#1014
edenhaus merged 1 commit into
devfrom
fix-cleaninfo

Conversation

@edenhaus

Copy link
Copy Markdown
Member

Copilot AI review requested due to automatic review settings June 10, 2025 16:29
@edenhaus edenhaus added the pr: bugfix PR, which fixes a bug label Jun 10, 2025

This comment was marked as outdated.

@edenhaus edenhaus requested a review from Copilot June 10, 2025 16:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 extends the valid states for cleaning by adding washing as an acceptable value in the cleanInfo command.

  • Updates test cases to pass the command class instead of an instance and add a new test case for the washing state.
  • Modifies the clean command logic to treat "washing" as equivalent to "clean" in state processing.

Reviewed Changes

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

File Description
tests/commands/json/test_clean.py Updates test parameter from an instance to a class and adds a washing state test case.
deebot_client/commands/json/clean.py Adjusts state mapping to include "washing" alongside "clean" and processes associated data.
Comments suppressed due to low confidence (2)

tests/commands/json/test_clean.py:62

  • [nitpick] Consider renaming the 'command' parameter to 'command_class' to clearly indicate that a class type is being passed instead of an instance.
async def test_GetCleanInfo(command: type[GetCleanInfo], data: tuple[dict[str, Any], FirmwareEvent], expected: StateEvent) -> None:

deebot_client/commands/json/clean.py:124

  • Consider adding an inline comment to document that the 'washing' state is intentionally processed in the same manner as 'clean' for clarity on state mapping.
elif state in ("clean", "washing"):

@codecov

codecov Bot commented Jun 10, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.77%. Comparing base (26fe58b) to head (9fcbf52).
Report is 2 commits behind head on dev.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1014      +/-   ##
==========================================
+ Coverage   93.65%   93.77%   +0.11%     
==========================================
  Files         129      129              
  Lines        5012     5012              
  Branches      327      327              
==========================================
+ Hits         4694     4700       +6     
+ Misses        258      249       -9     
- Partials       60       63       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed-hq

codspeed-hq Bot commented Jun 10, 2025

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #1014 will not alter performance

Comparing fix-cleaninfo (9fcbf52) with dev (26fe58b)

Summary

✅ 6 untouched benchmarks

@edenhaus edenhaus merged commit 9174712 into dev Jun 10, 2025
27 checks passed
@edenhaus edenhaus deleted the fix-cleaninfo branch June 10, 2025 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: bugfix PR, which fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ecovacs DEEBOT T20e OMNI: vacuum.start initiates new clean instead of resuming paused state

2 participants