pymiele 0.3.4__py3-none-any.whl → 0.3.6__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/const.py CHANGED
@@ -1,6 +1,6 @@
1
1
  """Constants for pymiele."""
2
2
 
3
- VERSION = "0.3.4"
3
+ VERSION = "0.3.6"
4
4
 
5
5
  MIELE_API = "https://api.mcs3.miele.com/v1"
6
6
  OAUTH2_AUTHORIZE = "https://api.mcs3.miele.com/thirdparty/login"
pymiele/model.py CHANGED
@@ -34,6 +34,11 @@ class MieleTemperature:
34
34
  """Return temperature object."""
35
35
  return self.raw_data["value_raw"]
36
36
 
37
+ @temperature.setter
38
+ def temperature(self, new_value: int) -> None:
39
+ """Write the temperature."""
40
+ self.raw_data["value_raw"] = new_value
41
+
37
42
 
38
43
  class MieleActionTargetTemperature:
39
44
  """A model of target temperature data."""
@@ -63,6 +68,29 @@ class MieleActionTargetTemperature:
63
68
  return self.raw_data["max"]
64
69
 
65
70
 
71
+ class MielePlateStep:
72
+ """Model of plate step."""
73
+
74
+ def __init__(self, raw_data: dict) -> None:
75
+ """Initialize MielePlateStep."""
76
+ self.raw_data = raw_data
77
+
78
+ @property
79
+ def raw(self) -> dict:
80
+ """Return raw data."""
81
+ return self.raw_data
82
+
83
+ @property
84
+ def value_raw(self) -> int | None:
85
+ """Return raw value data."""
86
+ return self.raw_data["value_raw"]
87
+
88
+ @property
89
+ def value_localized(self) -> int | None:
90
+ """Return localized value."""
91
+ return self.raw_data["value_localized"]
92
+
93
+
66
94
  class MieleDevice:
67
95
  """Data for a single device from API."""
68
96
 
@@ -149,7 +177,7 @@ class MieleDevice:
149
177
  ]
150
178
 
151
179
  @property
152
- def state_core_target_temperature(self) -> list[dict]:
180
+ def state_core_target_temperature(self) -> list[MieleTemperature]:
153
181
  """Return the core target temperature of the device."""
154
182
  return [
155
183
  MieleTemperature(temp)
@@ -252,9 +280,9 @@ class MieleDevice:
252
280
  self.raw_data["state"]["ventilationStep"]["value_raw"] = new_value
253
281
 
254
282
  @property
255
- def state_plate_step(self) -> list[dict]:
283
+ def state_plate_step(self) -> list[MielePlateStep]:
256
284
  """Return the plate step of the device."""
257
- return self.raw_data["state"]["plateStep"]
285
+ return [MielePlateStep(plate) for plate in self.raw_data["state"]["plateStep"]]
258
286
 
259
287
  @property
260
288
  def state_eco_feedback(self) -> dict | None:
@@ -352,16 +380,16 @@ class MieleAction:
352
380
  return list(self.raw_data["programId"])
353
381
 
354
382
  @property
355
- def runOnTime(self) -> list[int]:
383
+ def run_on_time(self) -> list[int]:
356
384
  """Return list of run on time actions."""
357
385
  return list(self.raw_data["runOnTime"])
358
386
 
359
387
  @property
360
- def target_temperature(self) -> list[dict]:
388
+ def target_temperature(self) -> list[MieleActionTargetTemperature]:
361
389
  """Return list of target temperature actions."""
362
390
  return [
363
391
  MieleActionTargetTemperature(temp)
364
- for temp in self.raw_data["state"]["targetTemperature"]
392
+ for temp in self.raw_data["targetTemperature"]
365
393
  ]
366
394
 
367
395
  @property
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pymiele
3
- Version: 0.3.4
3
+ Version: 0.3.6
4
4
  Summary: Python library for Miele integration with Home Assistant
5
5
  Author-email: Ake Strandberg <ake@strandberg.eu>
6
6
  License: MIT
@@ -0,0 +1,10 @@
1
+ pymiele/__init__.py,sha256=w_JvyaBHVGM7eo-FFwIWFbQUeAowoA_fbnAfCWJFGek,221
2
+ pymiele/const.py,sha256=tKBgQVpExWSIpP2VxJKJyxEBmZ6BQGohNZcL-6_ZRDc,237
3
+ pymiele/model.py,sha256=5MYK8SOG4oBNsXXGB6InOnqDLA-easCJbBXhaMaVK_8,15611
4
+ pymiele/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ pymiele/pymiele.py,sha256=M5P_rW61XZV06aelw5i9-qzJ9exabMYgLcehzuKd7-Y,8723
6
+ pymiele-0.3.6.dist-info/licenses/LICENSE,sha256=scGm4_U2pd-rsGa6Edf6zsXFebrMT4RoyQz7-904_Wg,1072
7
+ pymiele-0.3.6.dist-info/METADATA,sha256=geGMRgPZMwvufJY_4eQbgXhr_NRhS2CLhYqFYOhWjUw,747
8
+ pymiele-0.3.6.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
9
+ pymiele-0.3.6.dist-info/top_level.txt,sha256=BwkHrSO2w_Bfxh6s8Ikcao5enEuQOpQhJ3SwUXBqY10,8
10
+ pymiele-0.3.6.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (78.1.0)
2
+ Generator: setuptools (78.1.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,10 +0,0 @@
1
- pymiele/__init__.py,sha256=w_JvyaBHVGM7eo-FFwIWFbQUeAowoA_fbnAfCWJFGek,221
2
- pymiele/const.py,sha256=mqpuVyhut57CFo2StrEqkfbMp_kx1jy2086tLBa8urw,237
3
- pymiele/model.py,sha256=0MNzVw6gG7o9EJlPjDp8isaNmuigRZtz-6ka-ij33-8,14816
4
- pymiele/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- pymiele/pymiele.py,sha256=M5P_rW61XZV06aelw5i9-qzJ9exabMYgLcehzuKd7-Y,8723
6
- pymiele-0.3.4.dist-info/licenses/LICENSE,sha256=scGm4_U2pd-rsGa6Edf6zsXFebrMT4RoyQz7-904_Wg,1072
7
- pymiele-0.3.4.dist-info/METADATA,sha256=PxePuyW2AbK0TEaaiE-Bi3e6bWRSc_f7Q5CCn8gc9qM,747
8
- pymiele-0.3.4.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
9
- pymiele-0.3.4.dist-info/top_level.txt,sha256=BwkHrSO2w_Bfxh6s8Ikcao5enEuQOpQhJ3SwUXBqY10,8
10
- pymiele-0.3.4.dist-info/RECORD,,