Skip to content

Commit 5d67f37

Browse files
author
NOisi-X
committed
feat(zeo): validate/generate START parameters from a per-device capability table
Problem start_with sends mode, program and several wash/dry parameters together, but not every combination is valid. Each (mode, program) accepts only a specific set of levels, and the level index is not the protocol enum value — drying_mode is a cross-mapping (Low→Iron, Mid→Quick, High→Store), and soak/steam levels are offset. Callers had no way to know what a device/programme accepts and sent blindly. This PR Adds a per-device capability table (roborock/data/zeo/) that 1. resolves the mode templates a device supports from model/region/feature bits (resolve_mode_templates / resolve_data_module / build_mode_templates); 2. validates (validate_start_params) or generates (default_start_params) a valid START parameter set for a (mode, program), using that device's own data module. Covers 70 modules / 4212 mode records. Follow-up The exposed level data (ZeoParamConfig.support / raw_values, ZeoTimeOptions, ZeoModeLists) makes it possible to offer only valid choices in a frontend, so users cannot pick an illegal combination. It would be great if the integration maintainers could take this further and implement it end to end.
1 parent dcb7095 commit 5d67f37

10 files changed

Lines changed: 1316 additions & 1117 deletions

File tree

‎roborock/data/zeo/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1+
from .mode_templates import *
12
from .zeo_code_mappings import *
23
from .zeo_containers import *
3-
from .mode_templates import *
44
from .zeo_program_configs import *

0 commit comments

Comments
 (0)