33from dataclasses import dataclass
44
55from ..containers import RoborockBase
6+ from .zeo_code_mappings import (
7+ ZeoDryAndCare ,
8+ ZeoDryingMethod ,
9+ ZeoDryingMode ,
10+ ZeoMode ,
11+ ZeoProgram ,
12+ ZeoRinse ,
13+ ZeoSoak ,
14+ ZeoSpin ,
15+ ZeoSteamVolume ,
16+ ZeoTemperature ,
17+ )
618
719
820@dataclass
@@ -14,23 +26,12 @@ class ZeoStartParams(RoborockBase):
1426 included when the device reports a non-None value.
1527 """
1628
17- mode : int
18- """Wash mode (e.g. wash, wash-and-dry, dry, treatment)."""
19-
20- program : int
21- """Wash program (e.g. standard, quick, wool)."""
22-
23- temp : int | None = None
24- """Water temperature (always ``None`` for dryers)."""
25-
26- rinse_times : int | None = None
27- """Number of rinse cycles (always ``None`` for dryers)."""
28-
29- spin_level : int | None = None
30- """Spin speed in RPM (always ``None`` for dryers)."""
31-
32- drying_mode : int | None = None
33- """Drying mode (e.g. quick, iron, store)."""
29+ mode : ZeoMode
30+ program : ZeoProgram
31+ temperature : ZeoTemperature | None = None
32+ rinse : ZeoRinse | None = None
33+ spin : ZeoSpin | None = None
34+ drying_mode : ZeoDryingMode | None = None
3435
3536
3637# ── DP 222 (LoadCloudProgram) bitfield decoder ──────────────────────────
@@ -48,31 +49,31 @@ class ZeoCustomMode(RoborockBase):
4849 always non-negative).
4950 """
5051
51- program : int
52+ program : ZeoProgram
5253 """Wash program (bits 0-7)."""
5354
54- mode : int
55+ mode : ZeoMode
5556 """Wash mode (bits 8-9)."""
5657
57- temperature : int
58+ temperature : ZeoTemperature
5859 """Temperature (bits 10-12)."""
5960
60- rinse : int
61+ rinse : ZeoRinse
6162 """Rinse cycle (bits 13-15)."""
6263
63- spin : int
64+ spin : ZeoSpin
6465 """Spin speed (bits 16-18)."""
6566
66- dry : int
67+ drying_mode : ZeoDryingMode
6768 """Drying mode (bits 19-21)."""
6869
69- soak : int
70+ soak : ZeoSoak
7071 """Soak (bits 22-24)."""
7172
72- dry_care_mode : int
73+ dry_and_care : ZeoDryAndCare
7374 """Dry-care mode (bits 25-27)."""
7475
75- steam_volume : int
76+ steam_volume : ZeoSteamVolume
7677 """Steam volume (bits 28-30)."""
7778
7879 total_time_min : int = 0
@@ -87,9 +88,9 @@ def from_raw(cls, raw: int, total_time_min: int | None = None) -> "ZeoCustomMode
8788 temperature = (raw >> 10 ) & 0x7 ,
8889 rinse = (raw >> 13 ) & 0x7 ,
8990 spin = (raw >> 16 ) & 0x7 ,
90- dry = (raw >> 19 ) & 0x7 ,
91+ drying_mode = (raw >> 19 ) & 0x7 ,
9192 soak = (raw >> 22 ) & 0x7 ,
92- dry_care_mode = (raw >> 25 ) & 0x7 ,
93+ dry_and_care = (raw >> 25 ) & 0x7 ,
9394 steam_volume = (raw >> 28 ) & 0x7 ,
9495 total_time_min = total_time_min or 0 ,
9596 )
@@ -104,19 +105,19 @@ class ZeoDryerCustomMode(RoborockBase):
104105 in module 725 of the plugin bundle.
105106 """
106107
107- program : int
108+ program : ZeoProgram
108109 """Drying program (bits 0-7)."""
109110
110- mode : int
111+ mode : ZeoMode
111112 """Drying mode (bits 8-10)."""
112113
113- dry : int
114+ drying_mode : ZeoDryingMode
114115 """Drying level (bits 11-13)."""
115116
116- dry_method : int
117+ drying_method : ZeoDryingMethod
117118 """Drying method (bits 14-16)."""
118119
119- steam_volume : int
120+ steam_volume : ZeoSteamVolume
120121 """Steam volume (bits 17-19)."""
121122
122123 total_time_min : int = 0
@@ -132,8 +133,8 @@ def from_raw(cls, raw: int, total_time_min: int | None = None) -> "ZeoDryerCusto
132133 # bit 10 is re-allocated to mode. Washer uses 2 bits
133134 # (0x300, bits 8-9) to make room for temperature at 10-12.
134135 mode = (raw >> 8 ) & 0x7 ,
135- dry = (raw >> 11 ) & 0x7 ,
136- dry_method = (raw >> 14 ) & 0x7 ,
136+ drying_mode = (raw >> 11 ) & 0x7 ,
137+ drying_method = (raw >> 14 ) & 0x7 ,
137138 steam_volume = (raw >> 17 ) & 0x7 ,
138139 total_time_min = total_time_min or 0 ,
139140 )
0 commit comments