Repository navigation
Commit 5d67f37
NOisi-X
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
- mode_data
- devices/traits/a01
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | | - | |
4 | 4 | | |
0 commit comments