Skip to content

feat: register P30 Pro and decode water and dock status - #983

Open
eggleader-zhang wants to merge 1 commit into
Python-roborock:mainfrom
eggleader-zhang:codex/p30-pro-status-support
Open

eggleader-zhang wants to merge 1 commit into
Python-roborock:mainfrom
eggleader-zhang:codex/p30-pro-status-support

Conversation

@eggleader-zhang

Copy link
Copy Markdown

A Roborock P30 Pro (roborock.vacuum.a306) with an automatic water supply and drainage dock reports dock_type=49 and water_box_mode=210 when smart water is selected. The dock code currently falls back to unknown, and the water-slider name helper returns None for this setting.

This change registers the confirmed model and decodes these observed status values through the existing mappings.

Changes

  • Add ROBOROCK_P30_PRO and include it in SUPPORTED_VACUUMS.
  • Add type_49_dock, following the numeric naming used for docks whose internal name is not confirmed.
  • Add WaterModes.SMART_WATER for code 210 and handle it in get_water_slide_mode_name().
  • Add sanitized device and product fixtures using the existing discovery fixtures, parameterized status tests, and generated capability snapshots.

Device evidence

  • Model: roborock.vacuum.a306; firmware: 02.23.52; protocol: 1.0.
  • Dock: automatic water supply and drainage, with dust collection, mop washing, and drying.
  • App: Roborock V4.74.02(1).
  • General vacuum-and-mop mode, turbo suction, and standard route: fan_power=103, mop_mode=300, dock_type=49.
App water setting Reported water_box_mode Decoded name
Smart 210 smart_water
Manual slider at 10 230 gentle (existing slider mapping)

The smart-water sample was captured in general vacuum-and-mop mode, independently of SmartPlan. Existing control payloads and product-nickname mappings are unchanged; this change does not add new dock commands.

Validation

  • Pre-commit checks and commitlint passed.
  • Default unit suite on Windows/Python 3.13: 1473 passed, 99 snapshots passed, 53 expected failures. The 11 tests requiring a real MQTT broker were not run. The Windows run used the Proactor event loop for compatibility with the existing mocked MQTT socket tests.

AI disclosure

The code, tests, and this description were generated and edited with OpenAI Codex using user-provided device data and app observations.

Register the confirmed roborock.vacuum.a306 model and dock type 49.
Decode smart-water status code 210 through the existing slider helper.
Reuse device and product fixtures for status tests and capability snapshots.

AI disclosure: These code and test changes were generated and edited by
OpenAI Codex using user-provided device data and app observations.

Validation: Pre-commit checks passed. The default test suite passed with
1473 tests and 99 snapshots; 11 real-broker MQTT tests were excluded.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant