Skip to content

Commit c559d40

Browse files
fix: change devices fan speed enum to lower case
1 parent 0e0794d commit c559d40

File tree

1 file changed

+40
-47
lines changed

1 file changed

+40
-47
lines changed

roborock/code_mappings.py

Lines changed: 40 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -108,73 +108,72 @@ class RoborockErrorCode(RoborockEnum):
108108

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

115114

116115
class RoborockFanSpeedV1(RoborockFanPowerCode):
117-
Silent = 38
118-
Standard = 60
119-
Medium = 77
120-
Turbo = 90
116+
silent = 38
117+
standard = 60
118+
medium = 77
119+
turbo = 90
121120

122121

123122
class RoborockFanSpeedV2(RoborockFanPowerCode):
124-
Silent = 101
125-
Balanced = 102
126-
Turbo = 103
127-
Max = 104
128-
Gentle = 105
129-
Auto = 106
123+
silent = 101
124+
balanced = 102
125+
turbo = 103
126+
max = 104
127+
gentle = 105
128+
auto = 106
130129

131130

132131
class RoborockFanSpeedV3(RoborockFanPowerCode):
133-
Silent = 38
134-
Standard = 60
135-
Medium = 75
136-
Turbo = 100
132+
silent = 38
133+
standard = 60
134+
medium = 75
135+
turbo = 100
137136

138137

139138
class RoborockFanSpeedE2(RoborockFanPowerCode):
140-
Gentle = 41
141-
Silent = 50
142-
Standard = 68
143-
Medium = 79
144-
Turbo = 100
139+
gentle = 41
140+
silent = 50
141+
standard = 68
142+
medium = 79
143+
turbo = 100
145144

146145

147146
class RoborockFanSpeedS7(RoborockFanPowerCode):
148-
Off = 105
149-
Quiet = 101
150-
Balanced = 102
151-
Turbo = 103
152-
Max = 104
153-
Custom = 106
147+
off = 105
148+
quiet = 101
149+
balanced = 102
150+
turbo = 103
151+
max = 104
152+
custom = 106
154153

155154

156155
class RoborockFanSpeedS7MaxV(RoborockFanPowerCode):
157-
Off = 105
158-
Quiet = 101
159-
Balanced = 102
160-
Turbo = 103
161-
Max = 104
162-
Max_plus = 108
156+
off = 105
157+
quiet = 101
158+
balanced = 102
159+
turbo = 103
160+
max = 104
161+
max_plus = 108
163162

164163

165164
class RoborockFanSpeedS6Pure(RoborockFanPowerCode):
166-
Gentle = 105
167-
Quiet = 101
168-
Balanced = 102
169-
Turbo = 103
170-
Max = 104
165+
gentle = 105
166+
quiet = 101
167+
balanced = 102
168+
turbo = 103
169+
max = 104
171170

172171

173172
class RoborockFanSpeedQ7Max(RoborockFanPowerCode):
174-
Quiet = 101
175-
Balanced = 102
176-
Turbo = 103
177-
Max = 104
173+
quiet = 101
174+
balanced = 102
175+
turbo = 103
176+
max = 104
178177

179178

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

184183
class RoborockMopModeS7(RoborockMopModeCode):
185184
"""Describes the mop mode of the vacuum cleaner."""
186-
187185
standard = 300
188186
deep = 301
189187
custom = 302
@@ -203,7 +201,6 @@ class RoborockMopIntensityCode(RoborockEnum):
203201

204202
class RoborockMopIntensityS7(RoborockMopIntensityCode):
205203
"""Describes the mop intensity of the vacuum cleaner."""
206-
207204
off = 200
208205
mild = 201
209206
moderate = 202
@@ -213,7 +210,6 @@ class RoborockMopIntensityS7(RoborockMopIntensityCode):
213210

214211
class RoborockMopIntensityV2(RoborockMopIntensityCode):
215212
"""Describes the mop intensity of the vacuum cleaner."""
216-
217213
off = 200
218214
low = 201
219215
medium = 202
@@ -223,7 +219,6 @@ class RoborockMopIntensityV2(RoborockMopIntensityCode):
223219

224220
class RoborockDockErrorCode(RoborockEnum):
225221
"""Describes the error code of the dock."""
226-
227222
ok = 0
228223
water_empty = 38
229224
waste_water_tank_full = 39
@@ -239,7 +234,6 @@ class RoborockDockTypeCode(RoborockEnum):
239234

240235
class RoborockDockDustCollectionModeCode(RoborockEnum):
241236
"""Describes the dust collection mode of the vacuum cleaner."""
242-
243237
# TODO: Get the correct values for various different docks
244238
missing = -9999
245239
smart = 0
@@ -250,7 +244,6 @@ class RoborockDockDustCollectionModeCode(RoborockEnum):
250244

251245
class RoborockDockWashTowelModeCode(RoborockEnum):
252246
"""Describes the wash towel mode of the vacuum cleaner."""
253-
254247
# TODO: Get the correct values for various different docks
255248
missing = -9999
256249
light = 0

0 commit comments

Comments
 (0)