Skip to content

Commit 6a46515

Browse files
fix: test errors
1 parent c559d40 commit 6a46515

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

roborock/code_mappings.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ class RoborockErrorCode(RoborockEnum):
108108

109109
class RoborockFanPowerCode(RoborockEnum):
110110
"""Describes the fan power of the vacuum cleaner."""
111+
111112
# Fan speeds should have the first letter capitalized - as there is no way to change the name in translations as
112113
# far as I am aware
113114

@@ -182,6 +183,7 @@ class RoborockMopModeCode(RoborockEnum):
182183

183184
class RoborockMopModeS7(RoborockMopModeCode):
184185
"""Describes the mop mode of the vacuum cleaner."""
186+
185187
standard = 300
186188
deep = 301
187189
custom = 302
@@ -201,6 +203,7 @@ class RoborockMopIntensityCode(RoborockEnum):
201203

202204
class RoborockMopIntensityS7(RoborockMopIntensityCode):
203205
"""Describes the mop intensity of the vacuum cleaner."""
206+
204207
off = 200
205208
mild = 201
206209
moderate = 202
@@ -210,6 +213,7 @@ class RoborockMopIntensityS7(RoborockMopIntensityCode):
210213

211214
class RoborockMopIntensityV2(RoborockMopIntensityCode):
212215
"""Describes the mop intensity of the vacuum cleaner."""
216+
213217
off = 200
214218
low = 201
215219
medium = 202
@@ -219,6 +223,7 @@ class RoborockMopIntensityV2(RoborockMopIntensityCode):
219223

220224
class RoborockDockErrorCode(RoborockEnum):
221225
"""Describes the error code of the dock."""
226+
222227
ok = 0
223228
water_empty = 38
224229
waste_water_tank_full = 39
@@ -234,6 +239,7 @@ class RoborockDockTypeCode(RoborockEnum):
234239

235240
class RoborockDockDustCollectionModeCode(RoborockEnum):
236241
"""Describes the dust collection mode of the vacuum cleaner."""
242+
237243
# TODO: Get the correct values for various different docks
238244
missing = -9999
239245
smart = 0
@@ -244,6 +250,7 @@ class RoborockDockDustCollectionModeCode(RoborockEnum):
244250

245251
class RoborockDockWashTowelModeCode(RoborockEnum):
246252
"""Describes the wash towel mode of the vacuum cleaner."""
253+
247254
# TODO: Get the correct values for various different docks
248255
missing = -9999
249256
light = 0

roborock/containers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class HomeDataProduct(RoborockBase):
126126
capability: Optional[int] = None
127127
category: Optional[str] = None
128128
schema: Optional[list[HomeDataProductSchema]] = None
129-
model_specification: ModelSpecification | None = None
129+
model_specification: Optional[ModelSpecification] = None
130130

131131
def __post_init__(self):
132132
if self.model not in model_specifications:
@@ -147,7 +147,7 @@ class HomeDataDeviceStatus(RoborockBase):
147147
capability: Optional[Any] = None
148148
category: Optional[Any] = None
149149
schema: Optional[Any] = None
150-
model_specification: ModelSpecification | None = None
150+
model_specification: Optional[ModelSpecification] = None
151151

152152

153153
@dataclass

tests/test_containers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def test_status():
153153
assert s.unsave_map_reason == 0
154154
assert s.unsave_map_flag == 0
155155
s.update_status(model_specification=model_specifications[ROBOROCK_S7_MAXV])
156-
assert s.fan_power == RoborockFanSpeedS7MaxV.Balanced
156+
assert s.fan_power == RoborockFanSpeedS7MaxV.balanced
157157
assert s.mop_mode == RoborockMopModeS7.standard
158158
assert s.water_box_mode == RoborockMopIntensityS7.intense
159159

0 commit comments

Comments
 (0)