pymiele 0.4.3__py3-none-any.whl → 0.5.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pymiele/code_enum.py +7 -5
- pymiele/const.py +1 -1
- pymiele/model.py +312 -93
- {pymiele-0.4.3.dist-info → pymiele-0.5.0.dist-info}/METADATA +1 -1
- pymiele-0.5.0.dist-info/RECORD +11 -0
- {pymiele-0.4.3.dist-info → pymiele-0.5.0.dist-info}/WHEEL +1 -1
- pymiele-0.4.3.dist-info/RECORD +0 -11
- {pymiele-0.4.3.dist-info → pymiele-0.5.0.dist-info}/licenses/LICENSE +0 -0
- {pymiele-0.4.3.dist-info → pymiele-0.5.0.dist-info}/top_level.txt +0 -0
pymiele/code_enum.py
CHANGED
@@ -18,12 +18,14 @@ class MieleEnum(IntEnum):
|
|
18
18
|
|
19
19
|
@classmethod
|
20
20
|
def _missing_(cls, value: object) -> Any | None:
|
21
|
-
if hasattr(cls, "unknown"):
|
22
|
-
warning =
|
21
|
+
if hasattr(cls, "unknown_code") or hasattr(cls, "unknown"):
|
22
|
+
warning = (
|
23
|
+
f"Missing {cls.__name__} code: {value} - defaulting to 'unknown_code'"
|
24
|
+
)
|
23
25
|
if warning not in completed_warnings:
|
24
26
|
completed_warnings.add(warning)
|
25
27
|
_LOGGER.warning(warning)
|
26
|
-
return cls.
|
28
|
+
return cls.unknown_code
|
27
29
|
return None
|
28
30
|
|
29
31
|
def __new__(cls, value: int, *values: list[int]) -> Any:
|
@@ -37,12 +39,12 @@ class MieleEnum(IntEnum):
|
|
37
39
|
@classmethod
|
38
40
|
def as_dict(cls) -> dict[str, int]:
|
39
41
|
"""Return a dict of enum names and values."""
|
40
|
-
return {i.name: i.value for i in cls if i.name != "
|
42
|
+
return {i.name: i.value for i in cls if i.name != "unknown_code"}
|
41
43
|
|
42
44
|
@classmethod
|
43
45
|
def as_enum_dict(cls) -> dict[int, Any]:
|
44
46
|
"""Return a dict of enum values and enum names."""
|
45
|
-
return {i.value: i for i in cls if i.name != "
|
47
|
+
return {i.value: i for i in cls if i.name != "unknown_code"}
|
46
48
|
|
47
49
|
@classmethod
|
48
50
|
def values(cls) -> list[int]:
|
pymiele/const.py
CHANGED
pymiele/model.py
CHANGED
@@ -32,7 +32,7 @@ class MieleTemperature:
|
|
32
32
|
@property
|
33
33
|
def temperature(self) -> int | None:
|
34
34
|
"""Return temperature object."""
|
35
|
-
return self.raw_data
|
35
|
+
return self.raw_data.get("value_raw")
|
36
36
|
|
37
37
|
@temperature.setter
|
38
38
|
def temperature(self, new_value: int) -> None:
|
@@ -55,17 +55,17 @@ class MieleActionTargetTemperature:
|
|
55
55
|
@property
|
56
56
|
def zone(self) -> int | None:
|
57
57
|
"""Return zone value."""
|
58
|
-
return self.raw_data
|
58
|
+
return self.raw_data.get("zone")
|
59
59
|
|
60
60
|
@property
|
61
61
|
def min(self) -> int | None:
|
62
62
|
"""Return min value."""
|
63
|
-
return self.raw_data
|
63
|
+
return self.raw_data.get("min")
|
64
64
|
|
65
65
|
@property
|
66
66
|
def max(self) -> int | None:
|
67
67
|
"""Return max value."""
|
68
|
-
return self.raw_data
|
68
|
+
return self.raw_data.get("max")
|
69
69
|
|
70
70
|
|
71
71
|
class MielePlateStep:
|
@@ -83,12 +83,12 @@ class MielePlateStep:
|
|
83
83
|
@property
|
84
84
|
def value_raw(self) -> int | None:
|
85
85
|
"""Return raw value data."""
|
86
|
-
return self.raw_data
|
86
|
+
return self.raw_data.get("value_raw")
|
87
87
|
|
88
88
|
@property
|
89
|
-
def value_localized(self) ->
|
89
|
+
def value_localized(self) -> str | None:
|
90
90
|
"""Return localized value."""
|
91
|
-
return self.raw_data
|
91
|
+
return self.raw_data.get("value_localized")
|
92
92
|
|
93
93
|
|
94
94
|
class MieleDevice:
|
@@ -106,153 +106,266 @@ class MieleDevice:
|
|
106
106
|
@property
|
107
107
|
def fab_number(self) -> str:
|
108
108
|
"""Return the ID of the device."""
|
109
|
-
|
109
|
+
try:
|
110
|
+
ret_val = str(self.raw_data["ident"]["deviceIdentLabel"]["fabNumber"])
|
111
|
+
except KeyError:
|
112
|
+
ret_val = ""
|
113
|
+
return ret_val
|
110
114
|
|
111
115
|
@property
|
112
116
|
def device_type(self) -> int:
|
113
117
|
"""Return the type of the device."""
|
114
|
-
|
118
|
+
try:
|
119
|
+
ret_val = self.raw_data["ident"]["type"]["value_raw"]
|
120
|
+
except KeyError:
|
121
|
+
ret_val = 0
|
122
|
+
return ret_val
|
115
123
|
|
116
124
|
@property
|
117
125
|
def device_type_localized(self) -> str:
|
118
126
|
"""Return the type of the device."""
|
119
|
-
|
127
|
+
try:
|
128
|
+
ret_val = self.raw_data["ident"]["type"]["value_localized"]
|
129
|
+
except KeyError:
|
130
|
+
ret_val = ""
|
131
|
+
return ret_val
|
120
132
|
|
121
133
|
@property
|
122
134
|
def device_name(self) -> str:
|
123
135
|
"""Return the name of the device."""
|
124
|
-
|
136
|
+
try:
|
137
|
+
ret_val = self.raw_data["ident"]["deviceName"]
|
138
|
+
except KeyError:
|
139
|
+
ret_val = ""
|
140
|
+
return ret_val
|
125
141
|
|
126
142
|
@property
|
127
143
|
def tech_type(self) -> str:
|
128
144
|
"""Return the tech type of the device."""
|
129
|
-
|
145
|
+
try:
|
146
|
+
ret_val = self.raw_data["ident"]["deviceIdentLabel"]["techType"]
|
147
|
+
except KeyError:
|
148
|
+
ret_val = ""
|
149
|
+
return ret_val
|
130
150
|
|
131
151
|
@property
|
132
152
|
def xkm_tech_type(self) -> str:
|
133
153
|
"""Return the xkm tech type of the device."""
|
134
|
-
|
154
|
+
try:
|
155
|
+
ret_val = self.raw_data["ident"]["xkmIdentLabel"]["techType"]
|
156
|
+
except KeyError:
|
157
|
+
ret_val = None
|
158
|
+
return ret_val
|
135
159
|
|
136
160
|
@property
|
137
161
|
def xkm_release_version(self) -> str:
|
138
162
|
"""Return the xkm release version of the device."""
|
139
|
-
|
163
|
+
try:
|
164
|
+
ret_val = self.raw_data["ident"]["xkmIdentLabel"]["releaseVersion"]
|
165
|
+
except KeyError:
|
166
|
+
ret_val = ""
|
167
|
+
return ret_val
|
140
168
|
|
141
169
|
@property
|
142
170
|
def state_program_id(self) -> int:
|
143
171
|
"""Return the program ID of the device."""
|
144
|
-
|
172
|
+
try:
|
173
|
+
# Note that ProgramID is spelled this way in API data
|
174
|
+
ret_val = self.raw_data["state"]["ProgramID"]["value_raw"]
|
175
|
+
except KeyError:
|
176
|
+
ret_val = 0
|
177
|
+
return ret_val
|
145
178
|
|
146
179
|
@property
|
147
180
|
def state_program_id_localized(self) -> str:
|
148
181
|
"""Return the program ID of the device."""
|
149
|
-
|
182
|
+
try:
|
183
|
+
ret_val = self.raw_data["state"]["ProgramID"]["value_localized"]
|
184
|
+
except KeyError:
|
185
|
+
ret_val = ""
|
186
|
+
return ret_val
|
150
187
|
|
151
188
|
@property
|
152
189
|
def state_status(self) -> int:
|
153
190
|
"""Return the status of the device."""
|
154
|
-
|
191
|
+
try:
|
192
|
+
ret_val = self.raw_data["state"]["status"]["value_raw"]
|
193
|
+
except KeyError:
|
194
|
+
ret_val = 0
|
195
|
+
return ret_val
|
155
196
|
|
156
197
|
@property
|
157
198
|
def state_status_localized(self) -> str:
|
158
199
|
"""Return the status of the device."""
|
159
|
-
|
200
|
+
try:
|
201
|
+
ret_val = self.raw_data["state"]["status"]["value_localized"]
|
202
|
+
except KeyError:
|
203
|
+
ret_val = ""
|
204
|
+
return ret_val
|
160
205
|
|
161
206
|
@property
|
162
207
|
def state_program_type(self) -> int:
|
163
208
|
"""Return the program type of the device."""
|
164
|
-
|
209
|
+
try:
|
210
|
+
ret_val = self.raw_data["state"]["programType"]["value_raw"]
|
211
|
+
except KeyError:
|
212
|
+
ret_val = 0
|
213
|
+
return ret_val
|
165
214
|
|
166
215
|
@property
|
167
216
|
def state_program_type_localized(self) -> str:
|
168
217
|
"""Return the program type of the device."""
|
169
|
-
|
218
|
+
try:
|
219
|
+
ret_val = self.raw_data["state"]["programType"]["value_localized"]
|
220
|
+
except KeyError:
|
221
|
+
ret_val = ""
|
222
|
+
return ret_val
|
170
223
|
|
171
224
|
@property
|
172
225
|
def state_program_phase(self) -> int:
|
173
226
|
"""Return the program phase of the device."""
|
174
|
-
|
227
|
+
try:
|
228
|
+
ret_val = self.raw_data["state"]["programPhase"]["value_raw"]
|
229
|
+
except KeyError:
|
230
|
+
ret_val = 0
|
231
|
+
return ret_val
|
175
232
|
|
176
233
|
@property
|
177
234
|
def state_program_phase_localized(self) -> str:
|
178
235
|
"""Return the program phase of the device."""
|
179
|
-
|
236
|
+
try:
|
237
|
+
ret_val = self.raw_data["state"]["programPhase"]["value_localized"]
|
238
|
+
except KeyError:
|
239
|
+
ret_val = ""
|
240
|
+
return ret_val
|
180
241
|
|
181
242
|
@property
|
182
243
|
def state_remaining_time(self) -> list[int]:
|
183
244
|
"""Return the remaining time of the device."""
|
184
|
-
|
245
|
+
try:
|
246
|
+
ret_val = self.raw_data["state"]["remainingTime"]
|
247
|
+
except KeyError:
|
248
|
+
ret_val = []
|
249
|
+
return ret_val
|
185
250
|
|
186
251
|
@property
|
187
252
|
def state_start_time(self) -> list[int]:
|
188
253
|
"""Return the start time of the device."""
|
189
|
-
|
254
|
+
try:
|
255
|
+
ret_val = self.raw_data["state"]["startTime"]
|
256
|
+
except KeyError:
|
257
|
+
ret_val = []
|
258
|
+
return ret_val
|
190
259
|
|
191
260
|
@property
|
192
261
|
def state_target_temperature(self) -> list[MieleTemperature]:
|
193
262
|
"""Return the target temperature of the device."""
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
263
|
+
try:
|
264
|
+
ret_val = [
|
265
|
+
MieleTemperature(temp)
|
266
|
+
for temp in self.raw_data["state"]["targetTemperature"]
|
267
|
+
]
|
268
|
+
except KeyError:
|
269
|
+
ret_val = []
|
270
|
+
return ret_val
|
198
271
|
|
199
272
|
@property
|
200
273
|
def state_core_target_temperature(self) -> list[MieleTemperature]:
|
201
274
|
"""Return the core target temperature of the device."""
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
275
|
+
try:
|
276
|
+
ret_val = [
|
277
|
+
MieleTemperature(temp)
|
278
|
+
for temp in self.raw_data["state"]["coreTargetTemperature"]
|
279
|
+
]
|
280
|
+
except KeyError:
|
281
|
+
ret_val = []
|
282
|
+
return ret_val
|
206
283
|
|
207
284
|
@property
|
208
285
|
def state_temperatures(self) -> list[MieleTemperature]:
|
209
286
|
"""Return list of all temperatures."""
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
287
|
+
try:
|
288
|
+
ret_val = [
|
289
|
+
MieleTemperature(temp) for temp in self.raw_data["state"]["temperature"]
|
290
|
+
]
|
291
|
+
except KeyError:
|
292
|
+
ret_val = []
|
293
|
+
return ret_val
|
214
294
|
|
215
295
|
@property
|
216
296
|
def state_core_temperature(self) -> list[MieleTemperature]:
|
217
297
|
"""Return the core temperature of the device."""
|
218
|
-
|
219
|
-
|
220
|
-
|
298
|
+
try:
|
299
|
+
ret_val = [
|
300
|
+
MieleTemperature(temp)
|
301
|
+
for temp in self.raw_data["state"]["coreTemperature"]
|
302
|
+
]
|
303
|
+
except KeyError:
|
304
|
+
ret_val = []
|
305
|
+
return ret_val
|
221
306
|
|
222
307
|
@property
|
223
|
-
def state_signal_info(self) -> bool:
|
308
|
+
def state_signal_info(self) -> bool | None:
|
224
309
|
"""Return the signal info of the device."""
|
225
|
-
|
310
|
+
try:
|
311
|
+
ret_val = self.raw_data["state"]["signalInfo"]
|
312
|
+
except KeyError:
|
313
|
+
ret_val = None
|
314
|
+
return ret_val
|
226
315
|
|
227
316
|
@property
|
228
|
-
def state_signal_failure(self) -> bool:
|
317
|
+
def state_signal_failure(self) -> bool | None:
|
229
318
|
"""Return the signal failure of the device."""
|
230
|
-
|
319
|
+
try:
|
320
|
+
ret_val = self.raw_data["state"]["signalFailure"]
|
321
|
+
except KeyError:
|
322
|
+
ret_val = None
|
323
|
+
return ret_val
|
231
324
|
|
232
325
|
@property
|
233
|
-
def state_signal_door(self) -> bool:
|
326
|
+
def state_signal_door(self) -> bool | None:
|
234
327
|
"""Return the signal door of the device."""
|
235
|
-
|
328
|
+
try:
|
329
|
+
ret_val = self.raw_data["state"]["signalDoor"]
|
330
|
+
except KeyError:
|
331
|
+
ret_val = None
|
332
|
+
return ret_val
|
236
333
|
|
237
334
|
@property
|
238
|
-
def state_full_remote_control(self) -> bool:
|
335
|
+
def state_full_remote_control(self) -> bool | None:
|
239
336
|
"""Return the remote control enable of the device."""
|
240
|
-
|
337
|
+
try:
|
338
|
+
ret_val = self.raw_data["state"]["remoteEnable"]["fullRemoteControl"]
|
339
|
+
except KeyError:
|
340
|
+
ret_val = None
|
341
|
+
return ret_val
|
241
342
|
|
242
343
|
@property
|
243
|
-
def state_smart_grid(self) -> bool:
|
344
|
+
def state_smart_grid(self) -> bool | None:
|
244
345
|
"""Return the smart grid of the device."""
|
245
|
-
|
346
|
+
try:
|
347
|
+
ret_val = self.raw_data["state"]["remoteEnable"]["smartGrid"]
|
348
|
+
except KeyError:
|
349
|
+
ret_val = None
|
350
|
+
return ret_val
|
246
351
|
|
247
352
|
@property
|
248
|
-
def state_mobile_start(self) -> bool:
|
353
|
+
def state_mobile_start(self) -> bool | None:
|
249
354
|
"""Return the mobile start of the device."""
|
250
|
-
|
355
|
+
try:
|
356
|
+
ret_val = self.raw_data["state"]["remoteEnable"]["mobileStart"]
|
357
|
+
except KeyError:
|
358
|
+
ret_val = None
|
359
|
+
return ret_val
|
251
360
|
|
252
361
|
@property
|
253
|
-
def state_ambient_light(self) -> int:
|
362
|
+
def state_ambient_light(self) -> int | None:
|
254
363
|
"""Return the ambient light of the device."""
|
255
|
-
|
364
|
+
try:
|
365
|
+
ret_val = self.raw_data["state"]["ambientLight"]
|
366
|
+
except KeyError:
|
367
|
+
ret_val = None
|
368
|
+
return ret_val
|
256
369
|
|
257
370
|
@state_ambient_light.setter
|
258
371
|
def state_ambient_light(self, new_value: bool) -> None:
|
@@ -260,9 +373,13 @@ class MieleDevice:
|
|
260
373
|
self.raw_data["state"]["ambientLight"] = new_value
|
261
374
|
|
262
375
|
@property
|
263
|
-
def state_light(self) -> int:
|
376
|
+
def state_light(self) -> int | None:
|
264
377
|
"""Return the light of the device."""
|
265
|
-
|
378
|
+
try:
|
379
|
+
ret_val = self.raw_data["state"]["light"]
|
380
|
+
except KeyError:
|
381
|
+
ret_val = None
|
382
|
+
return ret_val
|
266
383
|
|
267
384
|
@state_light.setter
|
268
385
|
def state_light(self, new_value: int) -> None:
|
@@ -272,17 +389,29 @@ class MieleDevice:
|
|
272
389
|
@property
|
273
390
|
def state_elapsed_time(self) -> list[int]:
|
274
391
|
"""Return the elapsed time of the device."""
|
275
|
-
|
392
|
+
try:
|
393
|
+
ret_val = self.raw_data["state"]["elapsedTime"]
|
394
|
+
except KeyError:
|
395
|
+
ret_val = []
|
396
|
+
return ret_val
|
276
397
|
|
277
398
|
@property
|
278
399
|
def state_spinning_speed(self) -> int | None:
|
279
400
|
"""Return the spinning speed of the device."""
|
280
|
-
|
401
|
+
try:
|
402
|
+
ret_val = self.raw_data["state"]["spinningSpeed"]["value_raw"]
|
403
|
+
except KeyError:
|
404
|
+
ret_val = None
|
405
|
+
return ret_val
|
281
406
|
|
282
407
|
@property
|
283
408
|
def state_drying_step(self) -> int | None:
|
284
409
|
"""Return the drying step of the device."""
|
285
|
-
|
410
|
+
try:
|
411
|
+
ret_val = self.raw_data["state"]["dryingStep"]["value_raw"]
|
412
|
+
except KeyError:
|
413
|
+
ret_val = None
|
414
|
+
return ret_val
|
286
415
|
|
287
416
|
@state_drying_step.setter
|
288
417
|
def state_drying_step(self, new_value: int) -> None:
|
@@ -292,7 +421,11 @@ class MieleDevice:
|
|
292
421
|
@property
|
293
422
|
def state_ventilation_step(self) -> int | None:
|
294
423
|
"""Return the ventilation step of the device."""
|
295
|
-
|
424
|
+
try:
|
425
|
+
ret_val = self.raw_data["state"]["ventilationStep"]["value_raw"]
|
426
|
+
except KeyError:
|
427
|
+
ret_val = None
|
428
|
+
return ret_val
|
296
429
|
|
297
430
|
@state_ventilation_step.setter
|
298
431
|
def state_ventilation_step(self, new_value: int) -> None:
|
@@ -302,30 +435,48 @@ class MieleDevice:
|
|
302
435
|
@property
|
303
436
|
def state_plate_step(self) -> list[MielePlateStep]:
|
304
437
|
"""Return the plate step of the device."""
|
305
|
-
|
438
|
+
try:
|
439
|
+
ret_val = [
|
440
|
+
MielePlateStep(plate) for plate in self.raw_data["state"]["plateStep"]
|
441
|
+
]
|
442
|
+
except KeyError:
|
443
|
+
ret_val = []
|
444
|
+
return ret_val
|
306
445
|
|
307
446
|
@property
|
308
447
|
def state_eco_feedback(self) -> dict | None:
|
309
448
|
"""Return the eco feedback of the device."""
|
310
|
-
|
449
|
+
try:
|
450
|
+
ret_val = self.raw_data["state"]["ecoFeedback"]
|
451
|
+
except KeyError:
|
452
|
+
ret_val = None
|
453
|
+
return ret_val
|
311
454
|
|
312
455
|
@property
|
313
456
|
def current_water_consumption(self) -> float | None:
|
314
457
|
"""Return the current water consumption of the device."""
|
315
458
|
if self.state_eco_feedback is None:
|
316
459
|
return None
|
317
|
-
|
318
|
-
"
|
319
|
-
|
460
|
+
try:
|
461
|
+
ret_val = self.raw_data["state"]["ecoFeedback"].get(
|
462
|
+
"currentWaterConsumption"
|
463
|
+
)["value"]
|
464
|
+
except KeyError:
|
465
|
+
ret_val = None
|
466
|
+
return ret_val
|
320
467
|
|
321
468
|
@property
|
322
469
|
def current_energy_consumption(self) -> float | None:
|
323
470
|
"""Return the current energy consumption of the device."""
|
324
471
|
if self.state_eco_feedback is None:
|
325
472
|
return None
|
326
|
-
|
327
|
-
"
|
328
|
-
|
473
|
+
try:
|
474
|
+
ret_val = self.raw_data["state"]["ecoFeedback"].get(
|
475
|
+
"currentEnergyConsumption"
|
476
|
+
)["value"]
|
477
|
+
except KeyError:
|
478
|
+
ret_val = None
|
479
|
+
return ret_val
|
329
480
|
|
330
481
|
@property
|
331
482
|
def water_forecast(self) -> float | None:
|
@@ -344,7 +495,11 @@ class MieleDevice:
|
|
344
495
|
@property
|
345
496
|
def state_battery_level(self) -> int | None:
|
346
497
|
"""Return the battery level of the device."""
|
347
|
-
|
498
|
+
try:
|
499
|
+
ret_val = self.raw_data["state"]["batteryLevel"]
|
500
|
+
except KeyError:
|
501
|
+
ret_val = None
|
502
|
+
return ret_val
|
348
503
|
|
349
504
|
|
350
505
|
class MieleAction:
|
@@ -367,55 +522,91 @@ class MieleAction:
|
|
367
522
|
@property
|
368
523
|
def modes(self) -> list[int]:
|
369
524
|
"""Return list of modes."""
|
370
|
-
|
525
|
+
try:
|
526
|
+
ret_val = list(self.raw_data["modes"])
|
527
|
+
except KeyError:
|
528
|
+
ret_val = []
|
529
|
+
return ret_val
|
371
530
|
|
372
531
|
@property
|
373
532
|
def process_actions(self) -> list[int]:
|
374
533
|
"""Return list of process actions."""
|
375
|
-
|
534
|
+
try:
|
535
|
+
ret_val = list(self.raw_data["processAction"])
|
536
|
+
except KeyError:
|
537
|
+
ret_val = []
|
538
|
+
return ret_val
|
376
539
|
|
377
540
|
@property
|
378
541
|
def light(self) -> list[int]:
|
379
542
|
"""Return list of light actions."""
|
380
|
-
|
543
|
+
try:
|
544
|
+
ret_val = list(self.raw_data["light"])
|
545
|
+
except KeyError:
|
546
|
+
ret_val = []
|
547
|
+
return ret_val
|
381
548
|
|
382
549
|
@property
|
383
550
|
def ambient_light(self) -> list[int]:
|
384
551
|
"""Return list of ambient light actions."""
|
385
|
-
|
552
|
+
try:
|
553
|
+
ret_val = list(self.raw_data["ambientLight"])
|
554
|
+
except KeyError:
|
555
|
+
ret_val = []
|
556
|
+
return ret_val
|
386
557
|
|
387
558
|
@property
|
388
559
|
def start_time(self) -> list[int]:
|
389
560
|
"""Return list of start time actions."""
|
390
|
-
|
561
|
+
try:
|
562
|
+
ret_val = list(self.raw_data["start_time"])
|
563
|
+
except KeyError:
|
564
|
+
ret_val = []
|
565
|
+
return ret_val
|
391
566
|
|
392
567
|
@property
|
393
568
|
def ventilation_setp(self) -> list[int]:
|
394
569
|
"""Return list of ventilation step actions."""
|
395
|
-
|
570
|
+
try:
|
571
|
+
ret_val = list(self.raw_data["ventilationStep"])
|
572
|
+
except KeyError:
|
573
|
+
ret_val = []
|
574
|
+
return ret_val
|
396
575
|
|
397
576
|
@property
|
398
577
|
def program_id(self) -> list[int]:
|
399
578
|
"""Return list of program id actions."""
|
400
|
-
|
579
|
+
try:
|
580
|
+
ret_val = list(self.raw_data["programId"])
|
581
|
+
except KeyError:
|
582
|
+
ret_val = []
|
583
|
+
return ret_val
|
401
584
|
|
402
585
|
@property
|
403
586
|
def run_on_time(self) -> list[int]:
|
404
587
|
"""Return list of run on time actions."""
|
405
|
-
|
588
|
+
try:
|
589
|
+
ret_val = list(self.raw_data["runOnTime"])
|
590
|
+
except KeyError:
|
591
|
+
ret_val = []
|
592
|
+
return ret_val
|
406
593
|
|
407
594
|
@property
|
408
595
|
def target_temperature(self) -> list[MieleActionTargetTemperature]:
|
409
596
|
"""Return list of target temperature actions."""
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
597
|
+
try:
|
598
|
+
ret_val = [
|
599
|
+
MieleActionTargetTemperature(temp)
|
600
|
+
for temp in self.raw_data["targetTemperature"]
|
601
|
+
]
|
602
|
+
except KeyError:
|
603
|
+
ret_val = []
|
604
|
+
return ret_val
|
414
605
|
|
415
606
|
@property
|
416
607
|
def power_on_enabled(self) -> bool:
|
417
608
|
"""Return powerOn enabled."""
|
418
|
-
return self.raw_data
|
609
|
+
return self.raw_data.get("powerOn", False)
|
419
610
|
|
420
611
|
@power_on_enabled.setter
|
421
612
|
def power_on_enabled(self, value: bool) -> None:
|
@@ -425,7 +616,7 @@ class MieleAction:
|
|
425
616
|
@property
|
426
617
|
def power_off_enabled(self) -> bool:
|
427
618
|
"""Return powerOff enabled."""
|
428
|
-
return self.raw_data
|
619
|
+
return self.raw_data.get("powerOff", False)
|
429
620
|
|
430
621
|
@power_off_enabled.setter
|
431
622
|
def power_off_enabled(self, value: bool) -> None:
|
@@ -435,7 +626,7 @@ class MieleAction:
|
|
435
626
|
@property
|
436
627
|
def device_name_enabled(self) -> bool:
|
437
628
|
"""Return deviceName enabled."""
|
438
|
-
return self.raw_data
|
629
|
+
return self.raw_data.get("deviceName", False)
|
439
630
|
|
440
631
|
|
441
632
|
class MieleProgramsAvailable:
|
@@ -466,22 +657,26 @@ class MieleProgramAvailable:
|
|
466
657
|
@property
|
467
658
|
def program_id(self) -> int | None:
|
468
659
|
"""Return the ID of the program."""
|
469
|
-
return self.raw_data
|
660
|
+
return self.raw_data.get("programId")
|
470
661
|
|
471
662
|
@property
|
472
663
|
def program_name(self) -> str | None:
|
473
664
|
"""Return the name of the program."""
|
474
|
-
return self.raw_data
|
665
|
+
return self.raw_data.get("program")
|
475
666
|
|
476
667
|
@property
|
477
668
|
def parameters(self) -> dict | None:
|
478
669
|
"""Return the parameters of the program."""
|
479
|
-
return self.raw_data
|
670
|
+
return self.raw_data.get("parameters")
|
480
671
|
|
481
672
|
@property
|
482
673
|
def temperature(self) -> dict | None:
|
483
674
|
"""Return the temperature parameter of the program."""
|
484
|
-
|
675
|
+
try:
|
676
|
+
ret_val = self.raw_data["parameters"].get("temperature")
|
677
|
+
except KeyError:
|
678
|
+
ret_val = None
|
679
|
+
return ret_val
|
485
680
|
|
486
681
|
@property
|
487
682
|
def temperature_min(self) -> int | None:
|
@@ -491,29 +686,53 @@ class MieleProgramAvailable:
|
|
491
686
|
@property
|
492
687
|
def temperature_max(self) -> int | None:
|
493
688
|
"""Return the max temperature parameter of the program."""
|
494
|
-
|
689
|
+
try:
|
690
|
+
ret_val = self.raw_data["parameters"]["temperature"]["max"]
|
691
|
+
except KeyError:
|
692
|
+
ret_val = None
|
693
|
+
return ret_val
|
495
694
|
|
496
695
|
@property
|
497
696
|
def temperature_step(self) -> int | None:
|
498
697
|
"""Return the step temperature parameter of the program."""
|
499
|
-
|
698
|
+
try:
|
699
|
+
ret_val = self.raw_data["parameters"]["temperature"]["step"]
|
700
|
+
except KeyError:
|
701
|
+
ret_val = None
|
702
|
+
return ret_val
|
500
703
|
|
501
704
|
@property
|
502
705
|
def temperature_mandatory(self) -> bool | None:
|
503
706
|
"""Return the mandatory temperature parameter of the program."""
|
504
|
-
|
707
|
+
try:
|
708
|
+
ret_val = self.raw_data["parameters"]["temperature"]["mandatory"]
|
709
|
+
except KeyError:
|
710
|
+
ret_val = None
|
711
|
+
return ret_val
|
505
712
|
|
506
713
|
@property
|
507
714
|
def duration_min(self) -> list[int] | None:
|
508
715
|
"""Return the mandatory min parameter of the program."""
|
509
|
-
|
716
|
+
try:
|
717
|
+
ret_val = self.raw_data["parameters"]["duration"]["min"]
|
718
|
+
except KeyError:
|
719
|
+
ret_val = None
|
720
|
+
return ret_val
|
510
721
|
|
511
722
|
@property
|
512
723
|
def duration_max(self) -> list[int] | None:
|
513
724
|
"""Return the duration max parameter of the program."""
|
514
|
-
|
725
|
+
try:
|
726
|
+
ret_val = self.raw_data["parameters"]["duration"]["max"]
|
727
|
+
except KeyError:
|
728
|
+
ret_val = None
|
729
|
+
return ret_val
|
515
730
|
|
516
731
|
@property
|
517
732
|
def duration_mandatory(self) -> bool | None:
|
518
733
|
"""Return the mandatory duration parameter of the program."""
|
519
|
-
|
734
|
+
try:
|
735
|
+
ret_val = self.raw_data["parameters"]["duration"]["mandatory"]
|
736
|
+
except KeyError:
|
737
|
+
ret_val = None
|
738
|
+
return ret_val
|
@@ -0,0 +1,11 @@
|
|
1
|
+
pymiele/__init__.py,sha256=yaR_pvVA5HfAxQ9oHCk8CsoHfEkskdZLmxbY1QgrMBE,260
|
2
|
+
pymiele/code_enum.py,sha256=q8EfNM06JtNSq2Viv5E2p3MHPEqr3-AjyfMvHzwpcm0,1839
|
3
|
+
pymiele/const.py,sha256=JtfE0YP3ID7hGIEiQ87OwWf8SP-a0f8MAaP7ufwAKec,237
|
4
|
+
pymiele/model.py,sha256=oMf8CVnCrbrzvs66mVXNjilDolkRQV4UedtEVoOrD8A,21726
|
5
|
+
pymiele/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
+
pymiele/pymiele.py,sha256=yGL4rekRPGzwXziZ5ydVrsEN-XPN110dmuWygbXF148,9405
|
7
|
+
pymiele-0.5.0.dist-info/licenses/LICENSE,sha256=scGm4_U2pd-rsGa6Edf6zsXFebrMT4RoyQz7-904_Wg,1072
|
8
|
+
pymiele-0.5.0.dist-info/METADATA,sha256=NbjjhacKJz9QI5kkZEn4NsQQZ1lNLJpvByv-bACBg1Y,747
|
9
|
+
pymiele-0.5.0.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
10
|
+
pymiele-0.5.0.dist-info/top_level.txt,sha256=BwkHrSO2w_Bfxh6s8Ikcao5enEuQOpQhJ3SwUXBqY10,8
|
11
|
+
pymiele-0.5.0.dist-info/RECORD,,
|
pymiele-0.4.3.dist-info/RECORD
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
pymiele/__init__.py,sha256=yaR_pvVA5HfAxQ9oHCk8CsoHfEkskdZLmxbY1QgrMBE,260
|
2
|
-
pymiele/code_enum.py,sha256=QbSssdgg83EKOkPA2nuKk1idVnAqCjjkwmn8rNzoprw,1755
|
3
|
-
pymiele/const.py,sha256=LZuP8lmDbzidcwJ2aCWwjVQs8FtwyV-EZ_rfxmffuHM,237
|
4
|
-
pymiele/model.py,sha256=xJ8-J2fRlNHCO6g2_8mzpv0IKroHB3-VllzfGyjs-s4,16355
|
5
|
-
pymiele/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
-
pymiele/pymiele.py,sha256=yGL4rekRPGzwXziZ5ydVrsEN-XPN110dmuWygbXF148,9405
|
7
|
-
pymiele-0.4.3.dist-info/licenses/LICENSE,sha256=scGm4_U2pd-rsGa6Edf6zsXFebrMT4RoyQz7-904_Wg,1072
|
8
|
-
pymiele-0.4.3.dist-info/METADATA,sha256=-gv0mlruGix3gR99rfQtfvvR0WyKAbMbPbfbRoMdY7I,747
|
9
|
-
pymiele-0.4.3.dist-info/WHEEL,sha256=GHB6lJx2juba1wDgXDNlMTyM13ckjBMKf-OnwgKOCtA,91
|
10
|
-
pymiele-0.4.3.dist-info/top_level.txt,sha256=BwkHrSO2w_Bfxh6s8Ikcao5enEuQOpQhJ3SwUXBqY10,8
|
11
|
-
pymiele-0.4.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|