Repository navigation
fix(v1): give VacuumModes.OFF a distinct code from GENTLE - #1066
Open
saruk-vedant wants to merge 9 commits into
Open
saruk-vedant wants to merge 9 commits into
saruk-vedant wants to merge 9 commits into
Conversation
This was referenced Nov 18, 2026
This branch has not been deployed
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.
Summary
VacuumModes.GENTLE and VacuumModes.OFF shared code 105, so code lookups were ambiguous: from_code(105) always returned GENTLE and both members equalled 105. This applies the same distinct-value pattern used for WaterModes: OFF now keeps its own code (107) while GENTLE keeps 105.
105 stays the wire code: the app sends 105 (CleanModeZero) for mop-only cleaning, so OFF has no wire code of its own. A new vacuum_mode_wire_code() helper translates OFF back to 105 at the boundaries that send codes to the device or map reported codes to names (get_cleaning_mode_parameters, set_clean_then_mop, fan_speed_mapping), and _resolve_clean_mode still resolves a reported 105 by device capability (OFF on pure-mop devices, GENTLE otherwise).
How to test
Fixes
VacuumModes.GENTLEandVacuumModes.OFFshare value 105 #999