pymiele 0.4.0__py3-none-any.whl → 0.4.2__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 +8 -0
- pymiele/const.py +1 -1
- pymiele/pymiele.py +20 -0
- {pymiele-0.4.0.dist-info → pymiele-0.4.2.dist-info}/METADATA +2 -2
- pymiele-0.4.2.dist-info/RECORD +11 -0
- {pymiele-0.4.0.dist-info → pymiele-0.4.2.dist-info}/WHEEL +1 -1
- pymiele-0.4.0.dist-info/RECORD +0 -11
- {pymiele-0.4.0.dist-info → pymiele-0.4.2.dist-info}/licenses/LICENSE +0 -0
- {pymiele-0.4.0.dist-info → pymiele-0.4.2.dist-info}/top_level.txt +0 -0
pymiele/code_enum.py
CHANGED
@@ -26,6 +26,14 @@ class MieleEnum(IntEnum):
|
|
26
26
|
return cls.unknown
|
27
27
|
return None
|
28
28
|
|
29
|
+
def __new__(cls, value: int, *values: list[int]) -> Any:
|
30
|
+
"""Allow duplicate values."""
|
31
|
+
self = object.__new__(cls)
|
32
|
+
self._value_ = value
|
33
|
+
for v in values:
|
34
|
+
self._add_value_alias_(v)
|
35
|
+
return self
|
36
|
+
|
29
37
|
@classmethod
|
30
38
|
def as_dict(cls) -> dict[str, int]:
|
31
39
|
"""Return a dict of enum names and values."""
|
pymiele/const.py
CHANGED
pymiele/pymiele.py
CHANGED
@@ -159,6 +159,26 @@ class AbstractAuth(ABC):
|
|
159
159
|
_LOGGER.debug("set_program res: %s", res.status)
|
160
160
|
return res
|
161
161
|
|
162
|
+
async def set_room(
|
163
|
+
self, serial: str, data: dict[str, int | list[int]]
|
164
|
+
) -> ClientResponse:
|
165
|
+
"""Send start in room command."""
|
166
|
+
|
167
|
+
_LOGGER.debug("set_room serial: %s, data: %s", serial, data)
|
168
|
+
async with asyncio.timeout(AIO_TIMEOUT):
|
169
|
+
res = await self.request(
|
170
|
+
"PUT",
|
171
|
+
f"/devices/{serial}/rooms",
|
172
|
+
data=json.dumps(data),
|
173
|
+
headers={
|
174
|
+
"Content-Type": CONTENT_TYPE,
|
175
|
+
"Accept": "application/json",
|
176
|
+
},
|
177
|
+
)
|
178
|
+
res.raise_for_status()
|
179
|
+
_LOGGER.debug("set_room res: %s", res.status)
|
180
|
+
return res
|
181
|
+
|
162
182
|
async def listen_events(
|
163
183
|
self,
|
164
184
|
data_callback: Callable[[dict[str, Any]], Any] | None = None,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: pymiele
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.2
|
4
4
|
Summary: Python library for Miele integration with Home Assistant
|
5
5
|
Author-email: Ake Strandberg <ake@strandberg.eu>
|
6
6
|
License: MIT
|
@@ -9,7 +9,7 @@ Project-URL: BugTracker, https://github.com/nordicopen/pymiele/issues
|
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
10
10
|
Classifier: Operating System :: OS Independent
|
11
11
|
Classifier: Development Status :: 4 - Beta
|
12
|
-
Requires-Python: >=3.
|
12
|
+
Requires-Python: >=3.13.0
|
13
13
|
Description-Content-Type: text/markdown
|
14
14
|
License-File: LICENSE
|
15
15
|
Requires-Dist: aiohttp
|
@@ -0,0 +1,11 @@
|
|
1
|
+
pymiele/__init__.py,sha256=yaR_pvVA5HfAxQ9oHCk8CsoHfEkskdZLmxbY1QgrMBE,260
|
2
|
+
pymiele/code_enum.py,sha256=-nYXtoblXAdThhwzQYgcGkJ96Ynna3vfmAy-yAljtRI,1758
|
3
|
+
pymiele/const.py,sha256=ksXvY5kv9QaZcSEbkFdck89DIRjYIvwB-hRNOBYdo1E,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.2.dist-info/licenses/LICENSE,sha256=scGm4_U2pd-rsGa6Edf6zsXFebrMT4RoyQz7-904_Wg,1072
|
8
|
+
pymiele-0.4.2.dist-info/METADATA,sha256=sqzKyg9EzsAH6JMvA2mQESUBSeAGQxev3GS-rU-A07A,747
|
9
|
+
pymiele-0.4.2.dist-info/WHEEL,sha256=GHB6lJx2juba1wDgXDNlMTyM13ckjBMKf-OnwgKOCtA,91
|
10
|
+
pymiele-0.4.2.dist-info/top_level.txt,sha256=BwkHrSO2w_Bfxh6s8Ikcao5enEuQOpQhJ3SwUXBqY10,8
|
11
|
+
pymiele-0.4.2.dist-info/RECORD,,
|
pymiele-0.4.0.dist-info/RECORD
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
pymiele/__init__.py,sha256=yaR_pvVA5HfAxQ9oHCk8CsoHfEkskdZLmxbY1QgrMBE,260
|
2
|
-
pymiele/code_enum.py,sha256=AAtxgSyNtX96SlfdrFZs1DVwqTDR0jG2KfmOFoAkjI4,1511
|
3
|
-
pymiele/const.py,sha256=9Lx35sUTeS1Vg7ISdkD9Yknfd8H7TAfNUIs8vCXPgFM,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=M5P_rW61XZV06aelw5i9-qzJ9exabMYgLcehzuKd7-Y,8723
|
7
|
-
pymiele-0.4.0.dist-info/licenses/LICENSE,sha256=scGm4_U2pd-rsGa6Edf6zsXFebrMT4RoyQz7-904_Wg,1072
|
8
|
-
pymiele-0.4.0.dist-info/METADATA,sha256=1E8syZTDYz-xkxh8HYppilAD2mjqYA1QWINZoCwYnIY,747
|
9
|
-
pymiele-0.4.0.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
|
10
|
-
pymiele-0.4.0.dist-info/top_level.txt,sha256=BwkHrSO2w_Bfxh6s8Ikcao5enEuQOpQhJ3SwUXBqY10,8
|
11
|
-
pymiele-0.4.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|