Conversation
|
A note on the SCMap decode approach, since I explicitly looked at whether this should be modeled as "real protobuf" instead of the current tiny wire parser. Short version:
I did consider switching the inner decode to generated protobuf classes, but I decided against that for this PR. Why:
So the current choice is intentional:
To make future debugging less painful, I added a small dev-only helper script at If maintainers would prefer a different home for that helper, or would rather keep even that out of the repo, I’m happy to trim it further. Openclaw:
|
a81db61 to
67fc042
Compare
67fc042 to
487778a
Compare
8ef5515 to
2c839e0
Compare
2c839e0 to
2d73fd1
Compare
6b3ec67 to
bedf379
Compare
…erge (Python-roborock#783) * feat: Simplify V1 trait handling * Draft to set trait values * refactor: remove trait update listeners and centralize data conversion into dedicated converter classes * chore: Remove unused `typing.Self` import. * refactor: Standardize trait data merging to `merge_trait_values` and remove direct `_parse_response` methods from traits. * docs: clarify internal usage of V1TraitDataConverter and V1TraitMixin attributes. * style: Remove trailing whitespace from a blank line in `common.py` docstring. * refactor: Make V1TraitDataConverter an abstract base class, use a dedicated LedStatusConverter, and fix a typo in Rooms. * chore: Remove duplicate V1TraitDataConverter
* chore: Rename and reorder `YXFanLevel` enum members * chore: Fix MAX_PLUS enum value * docs: Add docstring and alias comments to the YXFanLevel enum. * chore: fix lint.
…borock#788) * feat: Add `from_any_optional` method to `CodeMapping` for flexible enum resolution with corresponding tests. * refactor: simplify B01_Q10 command parsing by removing a helper function and utilizing `from_any_optional`. * chore: apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Luke Lashley <conway220@gmail.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* feat: Q7 Get battery level * feat: Q7 Get battery level * Run lint
…ng (Python-roborock#791) * fix: add missing DPS fields to Q10Status and fix CLEAN_PROGRESS mapping * fix: correct comment for fan level in test_status_trait_refresh
…instead of legacy `*state` strings (Python-roborock#793) * fix(q10): normalize status names to canonical values * fix(q10): normalize YXDeviceState status names to canonical values * fix(q10): refactor test for canonical status names using a dictionary * fix(q10): add tests for Q10 status values and code mappings
…ency with V1 state values (Python-roborock#795) The motivation is to not have entirely different state values for the same concept to make it easier to write systems that can handle each device.
…thon-roborock#794) * refactor(q10): use readable YXCleanType values with legacy aliases * fix(cli): make clean mode option case insensitive * refactor(YXCleanType): move legacy values to a separate dictionary and update from_value method * test(YXCleanType): add tests for legacy clean type string aliases * refactor(YXCleanType): simplify clean type definitions and remove legacy alias support * test(YXCleanType): add tests for readable public values and compatibility with aliases * test(YXCleanType): add compatibility test for readable values in from_value method * test(q10): update clean type code mapping tests Co-authored-by: Allen Porter <allen.porter@gmail.com> * fix(q10): restrict clean mode cli choices * refactor(YXCleanType): remove legacy test for readable public values * test(YXCleanType): update test for readable values to use canonical names * test(YXCleanType): simplify test for readable values in from_value method --------- Co-authored-by: Allen Porter <allen.porter@gmail.com>
…hon-roborock#798) * chore: Migrate to `typing.Self` and remove `__future__` annotations. * chore: Use `typing.Self` for class-referencing type hints and dynamic instantiation * chore: Update roborock/roborock_message.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2dfd139 to
5d19def
Compare
5d19def to
99a63e6
Compare
Summary
Combine the old split-2/split-3 follow-up into one reviewable fork PR that adds a Q7/B01
map_contenttrait on top of the already-merged raw map transport work.This PR:
map_contenttrait with the same general refresh/cached-fields pattern used by v1device_managerwith access to device/product metadata needed for map decodingMAP_RESPONSEpayloadMapData.roomsDesign intent
The goal here is to keep the new work aligned with the existing codebase shape rather than inventing a separate parser/integration framework:
maptraitmap_contenttraitrefresh()performs I/O and populates cached fieldsValidation
ruff checkon touched filespytest -q→ 395 passedRoborock Q7T+(roborock.vacuum.sc05)174573558410..19/room1..room10Notes
This is fork-only for review first.