feat: implement RoborockDockState synthesis and RoborockChargeStatus enum#821
Open
allenporter wants to merge 2 commits intoPython-roborock:mainfrom
Open
feat: implement RoborockDockState synthesis and RoborockChargeStatus enum#821allenporter wants to merge 2 commits intoPython-roborock:mainfrom
allenporter wants to merge 2 commits intoPython-roborock:mainfrom
Conversation
…enum for improved device status reporting
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves Roborock V1 status reporting by introducing a richer charge_status enum and synthesizing a higher-level dock_state that better matches the Roborock app’s UI behavior (including off-peak charging waiting).
Changes:
- Add
RoborockChargeStatusenum and typecharge_statusfields accordingly. - Add synthesized
dock_stateproperty (based onstate,charge_status,battery) andRoborockDockStateenum for consumers. - Update/extend tests and snapshots to reflect the new fields and behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
roborock/data/v1/v1_code_mappings.py |
Adds RoborockChargeStatus and RoborockDockState enums. |
roborock/data/v1/v1_containers.py |
Updates charge_status typing and introduces synthesized dock_state property. |
tests/data/v1/test_v1_containers.py |
Updates expectations for charge_status and adds dock-state parametrized tests. |
tests/devices/__snapshots__/test_v1_device.ambr |
Updates snapshot output to include synthesized dock_state. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Lash-L
approved these changes
Apr 26, 2026
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.
The goal of this PR is to improve device status reporting. Today a device is considered "charging" even though it may not actually be charging yet due to waiting for some off peak time. This adds support for additional detail from
charge_statusto make it easier to interpret. This also adds a higher level enum based on behavior observed in the app of explaining the current dock state.Adds a lot of documentation about what these new combined states mean.
home-assistant/core#169151