Conversation
The device reports seq_type in its get_status payload, but StatusV2 did not model it, so RoborockBase.from_dict discarded it along with every other unmatched key. The vendor app reads the same field off the same payload to derive its "clean then mop" state. Add seq_type to StatusV2 and a clean_then_mop property on StatusTrait that reports whether the current run vacuums each room fully before mopping it. It describes the run in progress rather than a persisted setting, and the device offers no setter, so it is read only here; the value travels outbound as a parameter of the cleaning command instead. Gated for reporting on is_clean_then_mop_mode_supported. Verified against a Roborock Saros 20 (roborock.vacuum.a288).
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
The device reports
seq_typein itsget_statuspayload, butStatusV2did not model it, soRoborockBase.from_dictdiscarded it along with every other unmatched key.This adds
seq_typetoStatusV2and aclean_then_mopproperty onStatusTraitreporting whether the current configuration vacuums each room fully before mopping it ("clean then mop" / "vacuum then mop").Why it is
get_statusThe vendor Android app derives its own clean-then-mop state from the same field on the same payload. In the cloud-downloaded device plugin for
roborock.vacuum.a288,parseCleanModeStatusdoes:and its caller passes the status object — the same one it parses
charge_status,wash_readyandkctfrom.Verification
Tested against a Roborock Saros 20 (
roborock.vacuum.a288). Rawget_statusexcerpt:{"state": 8, "fan_power": 102, "water_box_mode": 235, "mop_mode": 300, "repeat": 1, "kct": 0, "subdivision_sets": 0, "seq_type": 0, ...}Toggling "vacuum then mop" in the Roborock app, with the robot docked and idle (
state: 8,in_cleaning: 0), flips the field and the new property follows it:seq_typeclean_then_mopFalseTrueSo this is a persisted device setting that tracks the app, not merely a per-run artifact.
uv run pytest(1037 passed) anduv run pre-commit run --all-filesboth pass. One syrupy snapshot updated for the new field.Notes and open questions
set_clean_motor_modeacceptsseq_typeand silently ignores it — sendingseq_type: 0returns["ok"]while the device continues to report1. If a maintainer knows the setter I am happy to add it.get_customize_clean_modereturnsseq_typeandrepeatper segment, e.g.[{"segment": 4, "fan_power": 102, "water_box_mode": 235, "mop_mode": 300, "repeat": 1, "seq_type": 0}]. This PR models only the global value fromget_status; the per-room layer is left alone.is_clean_then_mop_mode_supported, so devices without the feature are unaffected, but I cannot confirm behaviour on other models.get_statuscarries several other keys this library still drops (distance_off,cleaning_info,extra_time,monitor_status,exit_dock,pet_reminding,sub_error_code,sub_zone). Out of scope here, but happy to follow up if wanted.Motivation
Downstream this lets Home Assistant expose clean-then-mop as real device state rather than guessing. Deliberately not folded into
CleaningMode: the axes are independent — toggling clean-then-mop on the test device leftcurrent_cleaning_modeatvac_and_mop— and with no setter available aCleaningModemember would be readable but not selectable.