aiohomematic 2025.9.1__py3-none-any.whl → 2025.9.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.
Potentially problematic release.
This version of aiohomematic might be problematic. Click here for more details.
- aiohomematic/caches/dynamic.py +1 -6
- aiohomematic/central/__init__.py +34 -23
- aiohomematic/central/xml_rpc_server.py +1 -1
- aiohomematic/client/__init__.py +35 -29
- aiohomematic/client/json_rpc.py +44 -12
- aiohomematic/client/xml_rpc.py +53 -20
- aiohomematic/const.py +2 -2
- aiohomematic/decorators.py +56 -21
- aiohomematic/model/__init__.py +1 -1
- aiohomematic/model/calculated/__init__.py +1 -1
- aiohomematic/model/calculated/climate.py +1 -1
- aiohomematic/model/calculated/data_point.py +2 -2
- aiohomematic/model/calculated/operating_voltage_level.py +7 -21
- aiohomematic/model/calculated/support.py +20 -0
- aiohomematic/model/custom/__init__.py +1 -1
- aiohomematic/model/custom/climate.py +18 -18
- aiohomematic/model/custom/cover.py +1 -1
- aiohomematic/model/custom/data_point.py +1 -1
- aiohomematic/model/custom/light.py +1 -1
- aiohomematic/model/custom/lock.py +1 -1
- aiohomematic/model/custom/siren.py +1 -1
- aiohomematic/model/custom/switch.py +1 -1
- aiohomematic/model/custom/valve.py +1 -1
- aiohomematic/model/data_point.py +18 -18
- aiohomematic/model/device.py +21 -20
- aiohomematic/model/event.py +3 -8
- aiohomematic/model/generic/__init__.py +1 -1
- aiohomematic/model/generic/binary_sensor.py +1 -1
- aiohomematic/model/generic/button.py +1 -1
- aiohomematic/model/generic/data_point.py +3 -5
- aiohomematic/model/generic/number.py +1 -1
- aiohomematic/model/generic/select.py +1 -1
- aiohomematic/model/generic/sensor.py +1 -1
- aiohomematic/model/generic/switch.py +4 -4
- aiohomematic/model/generic/text.py +1 -1
- aiohomematic/model/hub/binary_sensor.py +1 -1
- aiohomematic/model/hub/button.py +2 -2
- aiohomematic/model/hub/data_point.py +4 -7
- aiohomematic/model/hub/number.py +1 -1
- aiohomematic/model/hub/select.py +2 -2
- aiohomematic/model/hub/sensor.py +1 -1
- aiohomematic/model/hub/switch.py +3 -3
- aiohomematic/model/hub/text.py +1 -1
- aiohomematic/model/support.py +1 -40
- aiohomematic/model/update.py +5 -4
- aiohomematic/property_decorators.py +327 -0
- aiohomematic/support.py +70 -85
- {aiohomematic-2025.9.1.dist-info → aiohomematic-2025.9.2.dist-info}/METADATA +7 -5
- aiohomematic-2025.9.2.dist-info/RECORD +78 -0
- aiohomematic_support/client_local.py +5 -5
- aiohomematic/model/decorators.py +0 -194
- aiohomematic-2025.9.1.dist-info/RECORD +0 -78
- {aiohomematic-2025.9.1.dist-info → aiohomematic-2025.9.2.dist-info}/WHEEL +0 -0
- {aiohomematic-2025.9.1.dist-info → aiohomematic-2025.9.2.dist-info}/licenses/LICENSE +0 -0
- {aiohomematic-2025.9.1.dist-info → aiohomematic-2025.9.2.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
aiohomematic/__init__.py,sha256=VPESkjzeVserFI2DDVAxD782cgYRlLK0sXJzLrr3e_k,2283
|
|
2
|
+
aiohomematic/async_support.py,sha256=Xc55KkIV0h8rf936QKyU4OHSZsPEZ8TwuV8gVveeRh8,6106
|
|
3
|
+
aiohomematic/const.py,sha256=EpW2w2XzvTzzzxByobHD7suUpA--ZkbzCmMTk79GK7I,25411
|
|
4
|
+
aiohomematic/context.py,sha256=M7gkA7KFT0dp35gzGz2dzKVXu1PP0sAnepgLlmjyRS4,451
|
|
5
|
+
aiohomematic/converter.py,sha256=QTOL8_B6SoCoqLuRSkjtOlfa7BVFSvOfnSBrDngiinA,3558
|
|
6
|
+
aiohomematic/decorators.py,sha256=oHEFSJoJVd-h9RYb6NLTJ60erkpRHPYv7EEipKn1a9Q,10636
|
|
7
|
+
aiohomematic/exceptions.py,sha256=o_H3Z0A2TQ0irNxUM9u8bmivq0L_mwPCB7nhxEawDxE,5018
|
|
8
|
+
aiohomematic/hmcli.py,sha256=wHOLq4IJRSY9RJux_ZfDH1gQ1ZqD0k68ua5agyBkkE8,4933
|
|
9
|
+
aiohomematic/property_decorators.py,sha256=LnWgLCkopkSqdz4dcwxoH2UuoWJmykA9YUFM7Zefw70,11710
|
|
10
|
+
aiohomematic/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
+
aiohomematic/support.py,sha256=9CsB27Xz0Q5tgqROceG2MaQuJGN1rI47YIUZM3N_2Ik,20374
|
|
12
|
+
aiohomematic/validator.py,sha256=vChkYQ9dGKCQEigiBMnoeyPkCJDJlIm6DSgR1gmeHH0,3545
|
|
13
|
+
aiohomematic/caches/__init__.py,sha256=_gI30tbsWgPRaHvP6cRxOQr6n9bYZzU-jp1WbHhWg-A,470
|
|
14
|
+
aiohomematic/caches/dynamic.py,sha256=Kp0bL5JZaPGGfsezuBX3VtADhEcUvu93AEB5j2rgzzY,21326
|
|
15
|
+
aiohomematic/caches/persistent.py,sha256=YBThIByt0mLQCgcZwBBmqanI8obAhHNcFULz_H-de8o,19932
|
|
16
|
+
aiohomematic/caches/visibility.py,sha256=uZ1sSCfmEQURllPvSbJ3EzFVFE7TU8XcxMDSHRpNmMs,31481
|
|
17
|
+
aiohomematic/central/__init__.py,sha256=y8JErLEY4zh8qsGyS1qMQPaPlQn3GEx6q5_L4OvqxlQ,86148
|
|
18
|
+
aiohomematic/central/decorators.py,sha256=Sl-cMDhreiAOKkIHiei-QbIOcvbWGVX-QwB5bLeohak,6904
|
|
19
|
+
aiohomematic/central/xml_rpc_server.py,sha256=DZcE3t_KWgJyQJM5Z9_yPO4s075DRJmnIdkIx0OTL9M,10549
|
|
20
|
+
aiohomematic/client/__init__.py,sha256=CX3b5LiWO6kJc1Nr6xQoksenk4mMLIyZFhp-LGOUQ1Q,69968
|
|
21
|
+
aiohomematic/client/_rpc_errors.py,sha256=vu76ZWMwJJEgB0cnXc10JzK8PaiRU7jYOvj1aC21CqE,2971
|
|
22
|
+
aiohomematic/client/json_rpc.py,sha256=07Vfc9laLHIXKG87jlJE1yiLuu4FD3bg25INsV1twkU,49313
|
|
23
|
+
aiohomematic/client/xml_rpc.py,sha256=Z964fzQtq9LaIYZXG02C82CvMU11shxA7yx7UouI_mI,9646
|
|
24
|
+
aiohomematic/model/__init__.py,sha256=LBKHws0W-zgFywTsWfklVVCxrO0w6QUY9ptT6LKxJls,5457
|
|
25
|
+
aiohomematic/model/data_point.py,sha256=QvHLLaq1NByB75mP4yIV0VCq4PPNcKdgVbbx07DEER8,40878
|
|
26
|
+
aiohomematic/model/device.py,sha256=OKecVb9hMb-LnbvojMHFKNH1A0-5yIikG9acYCuu3dU,52139
|
|
27
|
+
aiohomematic/model/event.py,sha256=EMoKjbOZRXD3jumRrSlSoUr3nZ2QM3GDKKFfhlf-D50,6837
|
|
28
|
+
aiohomematic/model/support.py,sha256=4VQsOlkJuPhq0hLHKt5LB43YgbITjnyJMwucUYGghzM,19616
|
|
29
|
+
aiohomematic/model/update.py,sha256=QVYFhaEqtHZhZ8yGPXEx2hPMne8WAc_SkVaQ0J20oQw,5138
|
|
30
|
+
aiohomematic/model/calculated/__init__.py,sha256=pk56FYa0MNyN0MTsejSy6RdQjOUCKAqzwWSzN6_ENmk,2808
|
|
31
|
+
aiohomematic/model/calculated/climate.py,sha256=0BhrsiVS74_6jo24I8Cg9WzVAD5od3IqgiwTM0ao2n0,8518
|
|
32
|
+
aiohomematic/model/calculated/data_point.py,sha256=DZyd9vBIxxjEU2BBevyMVwCUptu1cy0uCIOxbySw2HI,11535
|
|
33
|
+
aiohomematic/model/calculated/operating_voltage_level.py,sha256=urlCkHjisCJ-DO6tUE0evfp45tPwsYcb81_2uoHYxS0,13521
|
|
34
|
+
aiohomematic/model/calculated/support.py,sha256=K-oUSSH6k6_J7zZ9cwxt6qIfArWd-SBWo93LuZUs1_s,6674
|
|
35
|
+
aiohomematic/model/custom/__init__.py,sha256=1sWRrAjHnHSakdrrlNW4_SZ2rg5g2WjGdI4X2PUg_h0,6064
|
|
36
|
+
aiohomematic/model/custom/climate.py,sha256=utcyx2cWOK-jYz-EWQlCD9tjBsl_uDk77Fzt9kIcdXc,53987
|
|
37
|
+
aiohomematic/model/custom/const.py,sha256=Kh1pnab6nmwbaY43CfXQy3yrWpPwsrQdl1Ea2aZ6aw0,4961
|
|
38
|
+
aiohomematic/model/custom/cover.py,sha256=xaU-MfgpnG3Zkdb20BIDUezbvh3rI3HpM0sBg6IcX90,28555
|
|
39
|
+
aiohomematic/model/custom/data_point.py,sha256=d7B8gfyDDZf8HW3f0ofeHYF32GE8kgnQ0DZYSUbLHxY,14112
|
|
40
|
+
aiohomematic/model/custom/definition.py,sha256=1GkUyEsmjJfAdrBCW1ZBmboYZOyb00MctUE_xn4Zyl8,35481
|
|
41
|
+
aiohomematic/model/custom/light.py,sha256=8ourpK9U89a3nVp0_WZBTPl3TK9km9fir7W23Q9c4Ns,44173
|
|
42
|
+
aiohomematic/model/custom/lock.py,sha256=5G5BsQFHbYul-_FQwFWDq9E3o8RL54FjJm0yfnIMejc,11940
|
|
43
|
+
aiohomematic/model/custom/siren.py,sha256=O9SnAsR8E04d46O-Ahx_xRK4XwYQ_pk5BLpufCQ9BTc,9729
|
|
44
|
+
aiohomematic/model/custom/support.py,sha256=UvencsvCwgpm4iqRNRt5KRs560tyw1NhYP5ZaqmCT2k,1453
|
|
45
|
+
aiohomematic/model/custom/switch.py,sha256=sFBt0orv9NeWEkUqjGvc5g5COVQU239u2_9XxnSNGSs,6872
|
|
46
|
+
aiohomematic/model/custom/valve.py,sha256=XTjs0yqLvqjYEk2SS2SH4UGCMJOuqNgMd43TfQPKa2s,4229
|
|
47
|
+
aiohomematic/model/generic/__init__.py,sha256=goR2uBBGizm-A5Vvd7ii9Ai3OihBl3hIztmAEI3ceVQ,7611
|
|
48
|
+
aiohomematic/model/generic/action.py,sha256=5SPWVliRqXlPgtb2bI6le0-V6JR5krzw8z_0FaOXu5U,994
|
|
49
|
+
aiohomematic/model/generic/binary_sensor.py,sha256=U5GvfRYbhwe0jRmaedD4LVZ_24SyyPbVr74HEfZXoxE,887
|
|
50
|
+
aiohomematic/model/generic/button.py,sha256=6jZ49woI9gYJEx__PjguDNbc5vdE1P-YcLMZZFkYRCg,740
|
|
51
|
+
aiohomematic/model/generic/data_point.py,sha256=VuRj9C7hm8MHqWt2eO99osiKWCXx1MO7JNT9dNM08DI,5933
|
|
52
|
+
aiohomematic/model/generic/number.py,sha256=wHNIIVr41IOoROPOnBXuMRsANG6doguIEWXYnQHJbBk,2669
|
|
53
|
+
aiohomematic/model/generic/select.py,sha256=kxN5BR85Yli7kQF2DYkGiLnTgcY9LBJWI7MMwWpH1mo,1535
|
|
54
|
+
aiohomematic/model/generic/sensor.py,sha256=dWff7yBJfJSjoD4rcYdmH5HhaRCUEKfPFfOu4T1LrPo,2253
|
|
55
|
+
aiohomematic/model/generic/switch.py,sha256=oaXhECjSPT1WUdItEFTEbOLNCFZlaaqYByEHtL3GpTY,1833
|
|
56
|
+
aiohomematic/model/generic/text.py,sha256=vtNV7YxZuxF6LzNRKRAeOtSQtPQxPaEd560OFaVR13U,854
|
|
57
|
+
aiohomematic/model/hub/__init__.py,sha256=_UEEiNHfUVb0D0qTMcR2_YH1ZcYu1jzgLnUApPWfT2k,13493
|
|
58
|
+
aiohomematic/model/hub/binary_sensor.py,sha256=Z4o-zghHSc83ZHUUCtHqWEGueD9K1Fe0JEt_xJNdx_Y,752
|
|
59
|
+
aiohomematic/model/hub/button.py,sha256=XO4ied740BDOXBfTxFW30ROdZiOOxxu05Rmt4b_h06k,890
|
|
60
|
+
aiohomematic/model/hub/data_point.py,sha256=H_3REBK2lvoqITvqvupvg_ZnkcdxAIu_Qu8o0Wgc2Ds,10555
|
|
61
|
+
aiohomematic/model/hub/number.py,sha256=O5KrBU4nfZaxw2Pi2AmWAwQo8V_x79xrdt8ukoPme5Q,1222
|
|
62
|
+
aiohomematic/model/hub/select.py,sha256=My6flvM7Lmt5hF-Szx4a4X1KZZPkQ5lCVPCXTLuqBbQ,1659
|
|
63
|
+
aiohomematic/model/hub/sensor.py,sha256=cIr-7bsbOLBxnH33EHQ6D42vc61abO4QYLWLzkm1T10,1192
|
|
64
|
+
aiohomematic/model/hub/switch.py,sha256=510Vrlyak5TRsMvURrGYMkad-CbGUKWh20jjHQGOios,1390
|
|
65
|
+
aiohomematic/model/hub/text.py,sha256=bSNq4rgv2AIXELz-4HsaY-IMTYQYKsa-UX2aIwWle34,990
|
|
66
|
+
aiohomematic/rega_scripts/fetch_all_device_data.fn,sha256=7uxhHoelAOsH6yYr1n1M1XwIRgDmItiHnWIMhDYEimk,4373
|
|
67
|
+
aiohomematic/rega_scripts/get_program_descriptions.fn,sha256=pGmj377MkqbZi6j-UBKQAsXTphwh1kDwDKqXij8zUBE,835
|
|
68
|
+
aiohomematic/rega_scripts/get_serial.fn,sha256=t1oeo-sB_EuVeiY24PLcxFSkdQVgEWGXzpemJQZFybY,1079
|
|
69
|
+
aiohomematic/rega_scripts/get_system_variable_descriptions.fn,sha256=UKXvC0_5lSApdQ2atJc0E5Stj5Zt3lqh0EcliokYu2c,849
|
|
70
|
+
aiohomematic/rega_scripts/set_program_state.fn,sha256=0bnv7lUj8FMjDZBz325tDVP61m04cHjVj4kIOnUUgpY,279
|
|
71
|
+
aiohomematic/rega_scripts/set_system_variable.fn,sha256=sTmr7vkPTPnPkor5cnLKlDvfsYRbGO1iq2z_2pMXq5E,383
|
|
72
|
+
aiohomematic-2025.9.2.dist-info/licenses/LICENSE,sha256=q-B0xpREuZuvKsmk3_iyVZqvZ-vJcWmzMZpeAd0RqtQ,1083
|
|
73
|
+
aiohomematic_support/__init__.py,sha256=_0YtF4lTdC_k6-zrM2IefI0u0LMr_WA61gXAyeGLgbY,66
|
|
74
|
+
aiohomematic_support/client_local.py,sha256=4p0-PagFeNgu-r0EjhpHWfImgHMrdSgt8VUMBBC66J0,12514
|
|
75
|
+
aiohomematic-2025.9.2.dist-info/METADATA,sha256=VefZTtVGMgUabgxX2pfrEWWN7rnqJdM5ydd_Le-aQtg,7075
|
|
76
|
+
aiohomematic-2025.9.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
77
|
+
aiohomematic-2025.9.2.dist-info/top_level.txt,sha256=5TDRlUWQPThIUwQjOj--aUo4UA-ow4m0sNhnoCBi5n8,34
|
|
78
|
+
aiohomematic-2025.9.2.dist-info/RECORD,,
|
|
@@ -126,12 +126,12 @@ class ClientLocal(Client): # pragma: no cover
|
|
|
126
126
|
self._ping_pong_cache.handle_send_ping(ping_ts=datetime.now())
|
|
127
127
|
return True
|
|
128
128
|
|
|
129
|
-
@inspector
|
|
129
|
+
@inspector
|
|
130
130
|
async def execute_program(self, pid: str) -> bool:
|
|
131
131
|
"""Execute a program on CCU / Homegear."""
|
|
132
132
|
return True
|
|
133
133
|
|
|
134
|
-
@inspector
|
|
134
|
+
@inspector
|
|
135
135
|
async def set_program_state(self, pid: str, state: bool) -> bool:
|
|
136
136
|
"""Set the program state on CCU / Homegear."""
|
|
137
137
|
return True
|
|
@@ -141,12 +141,12 @@ class ClientLocal(Client): # pragma: no cover
|
|
|
141
141
|
"""Set a system variable on CCU / Homegear."""
|
|
142
142
|
return True
|
|
143
143
|
|
|
144
|
-
@inspector
|
|
144
|
+
@inspector
|
|
145
145
|
async def delete_system_variable(self, name: str) -> bool:
|
|
146
146
|
"""Delete a system variable from CCU / Homegear."""
|
|
147
147
|
return True
|
|
148
148
|
|
|
149
|
-
@inspector
|
|
149
|
+
@inspector
|
|
150
150
|
async def get_system_variable(self, name: str) -> str:
|
|
151
151
|
"""Get single system variable from CCU / Homegear."""
|
|
152
152
|
return "Empty"
|
|
@@ -231,7 +231,7 @@ class ClientLocal(Client): # pragma: no cover
|
|
|
231
231
|
await self.central.data_point_event(self.interface_id, channel_address, parameter, value)
|
|
232
232
|
return result
|
|
233
233
|
|
|
234
|
-
@inspector
|
|
234
|
+
@inspector
|
|
235
235
|
async def get_paramset(
|
|
236
236
|
self,
|
|
237
237
|
address: str,
|
aiohomematic/model/decorators.py
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
# SPDX-License-Identifier: MIT
|
|
2
|
-
# Copyright (c) 2021-2025 Daniel Perna, SukramJ
|
|
3
|
-
"""Decorators for data points used within aiohomematic."""
|
|
4
|
-
|
|
5
|
-
from __future__ import annotations
|
|
6
|
-
|
|
7
|
-
from collections.abc import Callable, Mapping
|
|
8
|
-
from datetime import datetime
|
|
9
|
-
from enum import Enum
|
|
10
|
-
from typing import Any, ParamSpec, TypeVar, cast
|
|
11
|
-
from weakref import WeakKeyDictionary
|
|
12
|
-
|
|
13
|
-
__all__ = [
|
|
14
|
-
"config_property",
|
|
15
|
-
"get_public_attributes_for_config_property",
|
|
16
|
-
"get_public_attributes_for_info_property",
|
|
17
|
-
"get_public_attributes_for_state_property",
|
|
18
|
-
"info_property",
|
|
19
|
-
"state_property",
|
|
20
|
-
]
|
|
21
|
-
|
|
22
|
-
P = ParamSpec("P")
|
|
23
|
-
T = TypeVar("T")
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
# pylint: disable=invalid-name
|
|
27
|
-
class generic_property[GETTER, SETTER](property):
|
|
28
|
-
"""Generic property implementation."""
|
|
29
|
-
|
|
30
|
-
fget: Callable[[Any], GETTER] | None
|
|
31
|
-
fset: Callable[[Any, SETTER], None] | None
|
|
32
|
-
fdel: Callable[[Any], None] | None
|
|
33
|
-
|
|
34
|
-
def __init__(
|
|
35
|
-
self,
|
|
36
|
-
fget: Callable[[Any], GETTER] | None = None,
|
|
37
|
-
fset: Callable[[Any, SETTER], None] | None = None,
|
|
38
|
-
fdel: Callable[[Any], None] | None = None,
|
|
39
|
-
doc: str | None = None,
|
|
40
|
-
) -> None:
|
|
41
|
-
"""Init the generic property."""
|
|
42
|
-
super().__init__(fget, fset, fdel, doc)
|
|
43
|
-
if doc is None and fget is not None:
|
|
44
|
-
doc = fget.__doc__
|
|
45
|
-
self.__doc__ = doc
|
|
46
|
-
|
|
47
|
-
def getter(self, fget: Callable[[Any], GETTER], /) -> generic_property:
|
|
48
|
-
"""Return generic getter."""
|
|
49
|
-
return type(self)(fget, self.fset, self.fdel, self.__doc__) # pragma: no cover
|
|
50
|
-
|
|
51
|
-
def setter(self, fset: Callable[[Any, SETTER], None], /) -> generic_property:
|
|
52
|
-
"""Return generic setter."""
|
|
53
|
-
return type(self)(self.fget, fset, self.fdel, self.__doc__)
|
|
54
|
-
|
|
55
|
-
def deleter(self, fdel: Callable[[Any], None], /) -> generic_property:
|
|
56
|
-
"""Return generic deleter."""
|
|
57
|
-
return type(self)(self.fget, self.fset, fdel, self.__doc__)
|
|
58
|
-
|
|
59
|
-
def __get__(self, obj: Any, gtype: type | None = None, /) -> GETTER: # type: ignore[override]
|
|
60
|
-
"""Return the attribute."""
|
|
61
|
-
if obj is None:
|
|
62
|
-
return self # type: ignore[return-value]
|
|
63
|
-
if self.fget is None:
|
|
64
|
-
raise AttributeError("unreadable attribute") # pragma: no cover
|
|
65
|
-
return self.fget(obj)
|
|
66
|
-
|
|
67
|
-
def __set__(self, obj: Any, value: Any, /) -> None:
|
|
68
|
-
"""Set the attribute."""
|
|
69
|
-
if self.fset is None:
|
|
70
|
-
raise AttributeError("can't set attribute") # pragma: no cover
|
|
71
|
-
self.fset(obj, value)
|
|
72
|
-
|
|
73
|
-
def __delete__(self, obj: Any, /) -> None:
|
|
74
|
-
"""Delete the attribute."""
|
|
75
|
-
if self.fdel is None:
|
|
76
|
-
raise AttributeError("can't delete attribute") # pragma: no cover
|
|
77
|
-
self.fdel(obj)
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
# pylint: disable=invalid-name
|
|
81
|
-
class config_property[GETTER, SETTER](generic_property[GETTER, SETTER]):
|
|
82
|
-
"""Decorate to mark own config properties."""
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
# pylint: disable=invalid-name
|
|
86
|
-
class info_property[GETTER, SETTER](generic_property[GETTER, SETTER]):
|
|
87
|
-
"""Decorate to mark own info properties."""
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
# pylint: disable=invalid-name
|
|
91
|
-
class state_property[GETTER, SETTER](generic_property[GETTER, SETTER]):
|
|
92
|
-
"""Decorate to mark own value properties."""
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
# Cache for per-class attribute names by decorator to avoid repeated dir() scans
|
|
96
|
-
# Use WeakKeyDictionary to allow classes to be garbage-collected without leaking cache entries.
|
|
97
|
-
# Structure: {cls: {decorator_class: (attr_name1, attr_name2, ...)}}
|
|
98
|
-
_PUBLIC_ATTR_CACHE: WeakKeyDictionary[type, dict[type, tuple[str, ...]]] = WeakKeyDictionary()
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
def _get_public_attributes_by_class_decorator(data_object: Any, class_decorator: type) -> Mapping[str, Any]:
|
|
102
|
-
"""
|
|
103
|
-
Return the object attributes by decorator.
|
|
104
|
-
|
|
105
|
-
This caches the attribute names per (class, decorator) to reduce overhead
|
|
106
|
-
from repeated dir()/getattr() scans. Values are not cached as they are
|
|
107
|
-
instance-dependent and may change over time.
|
|
108
|
-
|
|
109
|
-
To minimize side effects, exceptions raised by property getters are caught
|
|
110
|
-
and the corresponding value is set to None. This ensures that payload
|
|
111
|
-
construction and attribute introspection do not fail due to individual
|
|
112
|
-
properties with transient errors or expensive side effects.
|
|
113
|
-
"""
|
|
114
|
-
cls = data_object.__class__
|
|
115
|
-
|
|
116
|
-
# Get or create the per-class cache dict
|
|
117
|
-
if (decorator_cache := _PUBLIC_ATTR_CACHE.get(cls)) is None:
|
|
118
|
-
decorator_cache = {}
|
|
119
|
-
_PUBLIC_ATTR_CACHE[cls] = decorator_cache
|
|
120
|
-
|
|
121
|
-
# Get or compute the attribute names for this decorator
|
|
122
|
-
if (names := decorator_cache.get(class_decorator)) is None:
|
|
123
|
-
names = tuple(y for y in dir(cls) if not y.startswith("_") and isinstance(getattr(cls, y), class_decorator))
|
|
124
|
-
decorator_cache[class_decorator] = names
|
|
125
|
-
|
|
126
|
-
result: dict[str, Any] = {}
|
|
127
|
-
for name in names:
|
|
128
|
-
try:
|
|
129
|
-
value = getattr(data_object, name)
|
|
130
|
-
except Exception:
|
|
131
|
-
# Avoid propagating side effects/errors from getters
|
|
132
|
-
value = None
|
|
133
|
-
result[name] = _get_text_value(value)
|
|
134
|
-
return result
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
def _get_text_value(value: Any) -> Any:
|
|
138
|
-
"""Convert value to text."""
|
|
139
|
-
if isinstance(value, (list, tuple, set)):
|
|
140
|
-
return tuple(_get_text_value(v) for v in value)
|
|
141
|
-
if isinstance(value, Enum):
|
|
142
|
-
return str(value)
|
|
143
|
-
if isinstance(value, datetime):
|
|
144
|
-
return datetime.timestamp(value)
|
|
145
|
-
return value
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
def get_public_attributes_for_config_property(data_object: Any) -> Mapping[str, Any]:
|
|
149
|
-
"""Return the object attributes by decorator config_property."""
|
|
150
|
-
return _get_public_attributes_by_class_decorator(data_object=data_object, class_decorator=config_property)
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
def get_public_attributes_for_info_property(data_object: Any) -> Mapping[str, Any]:
|
|
154
|
-
"""Return the object attributes by decorator info_property."""
|
|
155
|
-
return _get_public_attributes_by_class_decorator(data_object=data_object, class_decorator=info_property)
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
def get_public_attributes_for_state_property(data_object: Any) -> Mapping[str, Any]:
|
|
159
|
-
"""Return the object attributes by decorator state_property."""
|
|
160
|
-
return _get_public_attributes_by_class_decorator(data_object=data_object, class_decorator=state_property)
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
# pylint: disable=invalid-name
|
|
164
|
-
class cached_slot_property[T, R]:
|
|
165
|
-
"""A property-like descriptor that caches the computed value in a slot attribute. Designed to work with classes that use __slots__ and do not define __dict__."""
|
|
166
|
-
|
|
167
|
-
def __init__(self, func: Callable[[T], R]) -> None:
|
|
168
|
-
"""Init the cached property."""
|
|
169
|
-
self._func = func # The function to compute the value
|
|
170
|
-
self._cache_attr = f"_cached_{func.__name__}" # Default name of the cache attribute
|
|
171
|
-
self._name = func.__name__
|
|
172
|
-
|
|
173
|
-
def __get__(self, instance: T | None, owner: type | None = None) -> R:
|
|
174
|
-
"""Return the cached value if it exists. Otherwise, compute it using the function and cache it."""
|
|
175
|
-
if instance is None:
|
|
176
|
-
# Accessed from class, return the descriptor itself
|
|
177
|
-
return cast(R, self)
|
|
178
|
-
|
|
179
|
-
# If the cached value is not set yet, compute and store it
|
|
180
|
-
if not hasattr(instance, self._cache_attr):
|
|
181
|
-
value = self._func(instance)
|
|
182
|
-
setattr(instance, self._cache_attr, value)
|
|
183
|
-
|
|
184
|
-
# Return the cached value
|
|
185
|
-
return cast(R, getattr(instance, self._cache_attr))
|
|
186
|
-
|
|
187
|
-
def __set__(self, instance: T, value: Any) -> None:
|
|
188
|
-
"""Raise an error to prevent manual assignment to the property."""
|
|
189
|
-
raise AttributeError(f"Can't set read-only cached property '{self._name}'")
|
|
190
|
-
|
|
191
|
-
def __delete__(self, instance: T) -> None:
|
|
192
|
-
"""Delete the cached value so it can be recomputed on next access."""
|
|
193
|
-
if hasattr(instance, self._cache_attr):
|
|
194
|
-
delattr(instance, self._cache_attr)
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
aiohomematic/__init__.py,sha256=VPESkjzeVserFI2DDVAxD782cgYRlLK0sXJzLrr3e_k,2283
|
|
2
|
-
aiohomematic/async_support.py,sha256=Xc55KkIV0h8rf936QKyU4OHSZsPEZ8TwuV8gVveeRh8,6106
|
|
3
|
-
aiohomematic/const.py,sha256=1a7G-J_JY45Ta7qAPcfp5XLOHI0Ubw7Y6yJrz3FB0aI,25407
|
|
4
|
-
aiohomematic/context.py,sha256=M7gkA7KFT0dp35gzGz2dzKVXu1PP0sAnepgLlmjyRS4,451
|
|
5
|
-
aiohomematic/converter.py,sha256=QTOL8_B6SoCoqLuRSkjtOlfa7BVFSvOfnSBrDngiinA,3558
|
|
6
|
-
aiohomematic/decorators.py,sha256=piayP-1t9PQe0pR8IGc_85so5XSiFLi-sIwtgkf3eWU,9725
|
|
7
|
-
aiohomematic/exceptions.py,sha256=o_H3Z0A2TQ0irNxUM9u8bmivq0L_mwPCB7nhxEawDxE,5018
|
|
8
|
-
aiohomematic/hmcli.py,sha256=wHOLq4IJRSY9RJux_ZfDH1gQ1ZqD0k68ua5agyBkkE8,4933
|
|
9
|
-
aiohomematic/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
-
aiohomematic/support.py,sha256=d70tjuajEQYGFsINJQA9-RkKuCRN8-2Sw33B0bPMym8,21495
|
|
11
|
-
aiohomematic/validator.py,sha256=vChkYQ9dGKCQEigiBMnoeyPkCJDJlIm6DSgR1gmeHH0,3545
|
|
12
|
-
aiohomematic/caches/__init__.py,sha256=_gI30tbsWgPRaHvP6cRxOQr6n9bYZzU-jp1WbHhWg-A,470
|
|
13
|
-
aiohomematic/caches/dynamic.py,sha256=ZrAQqXlzhoCvzjZ9cTEtlWqygvkn5xTzOJ987WcrPBc,21539
|
|
14
|
-
aiohomematic/caches/persistent.py,sha256=YBThIByt0mLQCgcZwBBmqanI8obAhHNcFULz_H-de8o,19932
|
|
15
|
-
aiohomematic/caches/visibility.py,sha256=uZ1sSCfmEQURllPvSbJ3EzFVFE7TU8XcxMDSHRpNmMs,31481
|
|
16
|
-
aiohomematic/central/__init__.py,sha256=uZ_Ns5upjTcz4AaA6cN1WNWYkpxtZZebDRvag0g7bwM,85736
|
|
17
|
-
aiohomematic/central/decorators.py,sha256=Sl-cMDhreiAOKkIHiei-QbIOcvbWGVX-QwB5bLeohak,6904
|
|
18
|
-
aiohomematic/central/xml_rpc_server.py,sha256=dM-gbAS1NpRy4wJKUZTsMI2LJfv_vjd4kvyv3pl86yw,10545
|
|
19
|
-
aiohomematic/client/__init__.py,sha256=hGpdDb518VdMYMHxrBBj2PBpUBN2Ah8ID5vjokd9PAU,69832
|
|
20
|
-
aiohomematic/client/_rpc_errors.py,sha256=vu76ZWMwJJEgB0cnXc10JzK8PaiRU7jYOvj1aC21CqE,2971
|
|
21
|
-
aiohomematic/client/json_rpc.py,sha256=6eHRYM4xcXUS_Ny3tnjSxw7F0GpaRMUjkqwj1HGaT7w,48231
|
|
22
|
-
aiohomematic/client/xml_rpc.py,sha256=OUWQkvYYbw9duFzNAB4CXavwwh-slBtitmMPGWShbNg,8504
|
|
23
|
-
aiohomematic/model/__init__.py,sha256=l1YMXkx1ugdUf7ms8lD8ObVaOzKAhi-4O2TO5s0IMd0,5459
|
|
24
|
-
aiohomematic/model/data_point.py,sha256=N446xJizb9jMtrX8TFW7NQ0wj8VbTxQREFsiVUnArKA,40738
|
|
25
|
-
aiohomematic/model/decorators.py,sha256=JGhDzWx983zBCEKA9UoptjFmIHOGX-UfgozhqXAeZsM,7663
|
|
26
|
-
aiohomematic/model/device.py,sha256=6PDtZPZ6S-3cjEmb20zrnAh6VYG9fMtAIi1OnuV9r5s,51991
|
|
27
|
-
aiohomematic/model/event.py,sha256=vXtqb9OfpumOOmbgj9z6DG-QeVUEHMOvK1gnv0piKDY,7014
|
|
28
|
-
aiohomematic/model/support.py,sha256=TnEpCB8EgJq_-4LoH-et1R0cPT6Lq4LTv7MxmRn5JQU,20767
|
|
29
|
-
aiohomematic/model/update.py,sha256=DemrlE8TleJgaxBwj984NxzZGeLEKpC3xAo0Ew21HLU,5107
|
|
30
|
-
aiohomematic/model/calculated/__init__.py,sha256=BHYLdWMMMjqvDI5T9cQ1sPOyk7t8_q-Ngfm4cFySvJ4,2810
|
|
31
|
-
aiohomematic/model/calculated/climate.py,sha256=BUKXT5kd6mbEE7TAJpRs8-A1K4pVq2d2E5cSfjsOPJw,8515
|
|
32
|
-
aiohomematic/model/calculated/data_point.py,sha256=hspOOnEp-WbXb4VMTcuXkgTWxjy0ug5E46zXZy6YReQ,11493
|
|
33
|
-
aiohomematic/model/calculated/operating_voltage_level.py,sha256=sf5Fy0bSbvee9lvq95-iFC05rSGkHBOKIQkdjQBU_XY,14011
|
|
34
|
-
aiohomematic/model/calculated/support.py,sha256=ODH3a2B1y8Mr9N_3sMt0pyUs1qQ1tDZsD2GthScntbg,6098
|
|
35
|
-
aiohomematic/model/custom/__init__.py,sha256=KNvUy3hZvdr3aRZk9CDyMqJBqRorQedZfOP3M-zwjp8,6066
|
|
36
|
-
aiohomematic/model/custom/climate.py,sha256=te8GoqqDU8wQAEDTf3Pyi8NFdm9MACCe8WyhBG74x28,54018
|
|
37
|
-
aiohomematic/model/custom/const.py,sha256=Kh1pnab6nmwbaY43CfXQy3yrWpPwsrQdl1Ea2aZ6aw0,4961
|
|
38
|
-
aiohomematic/model/custom/cover.py,sha256=dXYZGVzR-cFELbVP2az8tkM8h7jIrvzweUz4yWh7AM8,28552
|
|
39
|
-
aiohomematic/model/custom/data_point.py,sha256=mz143_hLKaF9HzJRhqqqzsoJhouLF0L_9Jo_4oq_6Gc,14109
|
|
40
|
-
aiohomematic/model/custom/definition.py,sha256=1GkUyEsmjJfAdrBCW1ZBmboYZOyb00MctUE_xn4Zyl8,35481
|
|
41
|
-
aiohomematic/model/custom/light.py,sha256=0QC6x6eYuDypNMbk-Ey7CMfVs1B0vgFz2YzFzqQhbzw,44170
|
|
42
|
-
aiohomematic/model/custom/lock.py,sha256=q-jsvMTly6s7kEWDT42rMEfEEJsd9lBIuwzpO2STFBk,11937
|
|
43
|
-
aiohomematic/model/custom/siren.py,sha256=yfWdNj-vEUGLqXBejjURd98RzY8MQv99oXxy35Ul_6U,9726
|
|
44
|
-
aiohomematic/model/custom/support.py,sha256=UvencsvCwgpm4iqRNRt5KRs560tyw1NhYP5ZaqmCT2k,1453
|
|
45
|
-
aiohomematic/model/custom/switch.py,sha256=JSmWUWc_WB8XmZPPgcISB9r3TNNUeg-E4skX46z7vwA,6869
|
|
46
|
-
aiohomematic/model/custom/valve.py,sha256=S5i2ZePa9Jt8JplIykzeJxpJrSBEN5w-3UEmGu0Q5G0,4226
|
|
47
|
-
aiohomematic/model/generic/__init__.py,sha256=OI0-ijDRYS6OkDqVd9C9UOfde2rfcB7WZZ9CLTlX1S0,7613
|
|
48
|
-
aiohomematic/model/generic/action.py,sha256=5SPWVliRqXlPgtb2bI6le0-V6JR5krzw8z_0FaOXu5U,994
|
|
49
|
-
aiohomematic/model/generic/binary_sensor.py,sha256=TI_KNzObiprHFS6rUKb7cYr2EsQQElfNo8Sk7eBY9NQ,884
|
|
50
|
-
aiohomematic/model/generic/button.py,sha256=9wStCwiE3NeGfKHum5IVpLlbq5jRdYOA1bGHSqReY8k,742
|
|
51
|
-
aiohomematic/model/generic/data_point.py,sha256=a7AXyYd0o-AfMOaGIn1qu8Q73ipjjsLLQrxMFJRw5xQ,6019
|
|
52
|
-
aiohomematic/model/generic/number.py,sha256=39paL6us6KMLD5L8GhR7BLl8bKtEiicAIfcd_3HyOw4,2666
|
|
53
|
-
aiohomematic/model/generic/select.py,sha256=vCe5FpMe2iqePQMHFBxKmkIBY6Y99SnTyiatmeZC6dM,1532
|
|
54
|
-
aiohomematic/model/generic/sensor.py,sha256=N2GeZjZQbRyc4s8lX11xvho_TOqIdT6Uqc7LguBF9Ho,2250
|
|
55
|
-
aiohomematic/model/generic/switch.py,sha256=wr6vEBc0iTyCGaRSVdoO_9UY8lt3-NPTyAXEhuZbAqU,1836
|
|
56
|
-
aiohomematic/model/generic/text.py,sha256=vTgQpX_COn1OxExZ5az9jPU410fGZIbq0PajPS8vXgs,851
|
|
57
|
-
aiohomematic/model/hub/__init__.py,sha256=_UEEiNHfUVb0D0qTMcR2_YH1ZcYu1jzgLnUApPWfT2k,13493
|
|
58
|
-
aiohomematic/model/hub/binary_sensor.py,sha256=0cF1SCJY1BRM1_Fx5oYPMaSZu9tDy1GnBMn_UqpqqPk,749
|
|
59
|
-
aiohomematic/model/hub/button.py,sha256=N0QSN-SdnLY38JslCoUaqjI2pcdp0DJY2kxoODUKO0s,889
|
|
60
|
-
aiohomematic/model/hub/data_point.py,sha256=3HscnhIbOQlipWZKliHZPvZulvtpTAF83qS0-4iCzVQ,10645
|
|
61
|
-
aiohomematic/model/hub/number.py,sha256=mj4HVRGgUqoyAyluSzKwlE_0jconltBAx-2nJuL9bhY,1224
|
|
62
|
-
aiohomematic/model/hub/select.py,sha256=s5_nmMCae35I7WtUK2Oo_577JzBt68BSpgv5cTussps,1658
|
|
63
|
-
aiohomematic/model/hub/sensor.py,sha256=Uqqb1rqVmYCemJK4yIkarkllKWZJTpd-VNiyLOKXl3M,1189
|
|
64
|
-
aiohomematic/model/hub/switch.py,sha256=1Dp_jG4qtnAs-itaZDKStmeD4PdiMtdZctDOoGWI-Qg,1391
|
|
65
|
-
aiohomematic/model/hub/text.py,sha256=AQOQB2W0jt8t__FxahDAAEOGhshkAX1pImHIFt_Xwqg,987
|
|
66
|
-
aiohomematic/rega_scripts/fetch_all_device_data.fn,sha256=7uxhHoelAOsH6yYr1n1M1XwIRgDmItiHnWIMhDYEimk,4373
|
|
67
|
-
aiohomematic/rega_scripts/get_program_descriptions.fn,sha256=pGmj377MkqbZi6j-UBKQAsXTphwh1kDwDKqXij8zUBE,835
|
|
68
|
-
aiohomematic/rega_scripts/get_serial.fn,sha256=t1oeo-sB_EuVeiY24PLcxFSkdQVgEWGXzpemJQZFybY,1079
|
|
69
|
-
aiohomematic/rega_scripts/get_system_variable_descriptions.fn,sha256=UKXvC0_5lSApdQ2atJc0E5Stj5Zt3lqh0EcliokYu2c,849
|
|
70
|
-
aiohomematic/rega_scripts/set_program_state.fn,sha256=0bnv7lUj8FMjDZBz325tDVP61m04cHjVj4kIOnUUgpY,279
|
|
71
|
-
aiohomematic/rega_scripts/set_system_variable.fn,sha256=sTmr7vkPTPnPkor5cnLKlDvfsYRbGO1iq2z_2pMXq5E,383
|
|
72
|
-
aiohomematic-2025.9.1.dist-info/licenses/LICENSE,sha256=q-B0xpREuZuvKsmk3_iyVZqvZ-vJcWmzMZpeAd0RqtQ,1083
|
|
73
|
-
aiohomematic_support/__init__.py,sha256=_0YtF4lTdC_k6-zrM2IefI0u0LMr_WA61gXAyeGLgbY,66
|
|
74
|
-
aiohomematic_support/client_local.py,sha256=cvkO3tcxSJKy5ZLVdeqDbvSmeottxqZJNI4ccdxIVD4,12524
|
|
75
|
-
aiohomematic-2025.9.1.dist-info/METADATA,sha256=qsC9QfkxhshJIvpgktrIYwKsmoTrBtnsPtpcl2HbgE4,6960
|
|
76
|
-
aiohomematic-2025.9.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
77
|
-
aiohomematic-2025.9.1.dist-info/top_level.txt,sha256=5TDRlUWQPThIUwQjOj--aUo4UA-ow4m0sNhnoCBi5n8,34
|
|
78
|
-
aiohomematic-2025.9.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|