plugwise 1.7.3a2__tar.gz → 1.7.4__tar.gz
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.
- {plugwise-1.7.3a2 → plugwise-1.7.4}/PKG-INFO +4 -27
- {plugwise-1.7.3a2 → plugwise-1.7.4}/plugwise/__init__.py +4 -12
- {plugwise-1.7.3a2 → plugwise-1.7.4}/plugwise/common.py +5 -0
- {plugwise-1.7.3a2 → plugwise-1.7.4}/plugwise/constants.py +0 -11
- {plugwise-1.7.3a2 → plugwise-1.7.4}/plugwise/data.py +2 -12
- {plugwise-1.7.3a2 → plugwise-1.7.4}/plugwise/helper.py +14 -4
- {plugwise-1.7.3a2 → plugwise-1.7.4}/plugwise/legacy/data.py +2 -12
- {plugwise-1.7.3a2 → plugwise-1.7.4}/plugwise/legacy/helper.py +19 -8
- {plugwise-1.7.3a2 → plugwise-1.7.4}/plugwise/legacy/smile.py +6 -4
- {plugwise-1.7.3a2 → plugwise-1.7.4}/plugwise/smile.py +11 -8
- {plugwise-1.7.3a2 → plugwise-1.7.4}/plugwise.egg-info/PKG-INFO +4 -27
- {plugwise-1.7.3a2 → plugwise-1.7.4}/plugwise.egg-info/SOURCES.txt +0 -1
- {plugwise-1.7.3a2 → plugwise-1.7.4}/pyproject.toml +3 -12
- {plugwise-1.7.3a2 → plugwise-1.7.4}/setup.cfg +0 -3
- {plugwise-1.7.3a2 → plugwise-1.7.4}/tests/test_init.py +8 -8
- plugwise-1.7.3a2/setup.py +0 -5
- {plugwise-1.7.3a2 → plugwise-1.7.4}/LICENSE +0 -0
- {plugwise-1.7.3a2 → plugwise-1.7.4}/README.md +0 -0
- {plugwise-1.7.3a2 → plugwise-1.7.4}/plugwise/exceptions.py +0 -0
- {plugwise-1.7.3a2 → plugwise-1.7.4}/plugwise/py.typed +0 -0
- {plugwise-1.7.3a2 → plugwise-1.7.4}/plugwise/smilecomm.py +0 -0
- {plugwise-1.7.3a2 → plugwise-1.7.4}/plugwise/util.py +0 -0
- {plugwise-1.7.3a2 → plugwise-1.7.4}/plugwise.egg-info/dependency_links.txt +0 -0
- {plugwise-1.7.3a2 → plugwise-1.7.4}/plugwise.egg-info/requires.txt +0 -0
- {plugwise-1.7.3a2 → plugwise-1.7.4}/plugwise.egg-info/top_level.txt +0 -0
- {plugwise-1.7.3a2 → plugwise-1.7.4}/tests/test_adam.py +0 -0
- {plugwise-1.7.3a2 → plugwise-1.7.4}/tests/test_anna.py +0 -0
- {plugwise-1.7.3a2 → plugwise-1.7.4}/tests/test_generic.py +0 -0
- {plugwise-1.7.3a2 → plugwise-1.7.4}/tests/test_legacy_anna.py +0 -0
- {plugwise-1.7.3a2 → plugwise-1.7.4}/tests/test_legacy_generic.py +0 -0
- {plugwise-1.7.3a2 → plugwise-1.7.4}/tests/test_legacy_p1.py +0 -0
- {plugwise-1.7.3a2 → plugwise-1.7.4}/tests/test_legacy_stretch.py +0 -0
- {plugwise-1.7.3a2 → plugwise-1.7.4}/tests/test_p1.py +0 -0
@@ -1,39 +1,15 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: plugwise
|
3
|
-
Version: 1.7.
|
3
|
+
Version: 1.7.4
|
4
4
|
Summary: Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3.
|
5
|
-
Home-page: https://github.com/plugwise/python-plugwise
|
6
5
|
Author: Plugwise device owners
|
7
6
|
Maintainer: bouwew, CoMPaTech
|
8
|
-
License: MIT
|
9
|
-
|
10
|
-
Copyright (c) 2019 @laetificat, 2019-2020 @CoMPaTech & @bouwew, 2020-current @CoMPaTech, @bouwew & @brefra
|
11
|
-
|
12
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
13
|
-
of this software and associated documentation files (the "Software"), to deal
|
14
|
-
in the Software without restriction, including without limitation the rights
|
15
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
16
|
-
copies of the Software, and to permit persons to whom the Software is
|
17
|
-
furnished to do so, subject to the following conditions:
|
18
|
-
|
19
|
-
The above copyright notice and this permission notice shall be included in all
|
20
|
-
copies or substantial portions of the Software.
|
21
|
-
|
22
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
23
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
24
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
25
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
26
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
27
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
28
|
-
SOFTWARE.
|
29
|
-
|
7
|
+
License-Expression: MIT
|
30
8
|
Project-URL: Source Code, https://github.com/plugwise/python-plugwise
|
31
9
|
Project-URL: Bug Reports, https://github.com/plugwise/python-plugwise/issues
|
32
10
|
Keywords: home,automation,plugwise,module
|
33
|
-
Platform: any
|
34
11
|
Classifier: Development Status :: 5 - Production/Stable
|
35
12
|
Classifier: Intended Audience :: Developers
|
36
|
-
Classifier: License :: OSI Approved :: MIT License
|
37
13
|
Classifier: Operating System :: OS Independent
|
38
14
|
Classifier: Programming Language :: Python :: 3.12
|
39
15
|
Classifier: Programming Language :: Python :: 3.13
|
@@ -45,6 +21,7 @@ Requires-Dist: aiohttp
|
|
45
21
|
Requires-Dist: defusedxml
|
46
22
|
Requires-Dist: munch
|
47
23
|
Requires-Dist: python-dateutil
|
24
|
+
Dynamic: license-file
|
48
25
|
|
49
26
|
# Plugwise python module
|
50
27
|
|
@@ -18,7 +18,6 @@ from plugwise.constants import (
|
|
18
18
|
STATUS,
|
19
19
|
SYSTEM,
|
20
20
|
GwEntityData,
|
21
|
-
SmileProps,
|
22
21
|
ThermoLoc,
|
23
22
|
)
|
24
23
|
from plugwise.exceptions import (
|
@@ -69,7 +68,6 @@ class Smile(SmileComm):
|
|
69
68
|
self._opentherm_device = False
|
70
69
|
self._schedule_old_states: dict[str, dict[str, str]] = {}
|
71
70
|
self._smile_api: SmileAPI | SmileLegacyAPI
|
72
|
-
self._smile_props: SmileProps = {}
|
73
71
|
self._stretch_v2 = False
|
74
72
|
self._target_smile: str = NONE
|
75
73
|
self.smile_hostname: str = NONE
|
@@ -86,26 +84,22 @@ class Smile(SmileComm):
|
|
86
84
|
@property
|
87
85
|
def cooling_present(self) -> bool:
|
88
86
|
"""Return the cooling capability."""
|
89
|
-
|
90
|
-
return self._smile_props["cooling_present"]
|
91
|
-
return False
|
87
|
+
return self._smile_api.cooling_present
|
92
88
|
|
93
89
|
@property
|
94
90
|
def gateway_id(self) -> str:
|
95
91
|
"""Return the gateway-id."""
|
96
|
-
return self.
|
92
|
+
return self._smile_api.gateway_id
|
97
93
|
|
98
94
|
@property
|
99
95
|
def heater_id(self) -> str:
|
100
96
|
"""Return the heater-id."""
|
101
|
-
|
102
|
-
return self._smile_props["heater_id"]
|
103
|
-
return NONE
|
97
|
+
return self._smile_api.heater_id
|
104
98
|
|
105
99
|
@property
|
106
100
|
def item_count(self) -> int:
|
107
101
|
"""Return the item-count."""
|
108
|
-
return self.
|
102
|
+
return self._smile_api.item_count
|
109
103
|
|
110
104
|
@property
|
111
105
|
def reboot(self) -> bool:
|
@@ -162,7 +156,6 @@ class Smile(SmileComm):
|
|
162
156
|
self._opentherm_device,
|
163
157
|
self._request,
|
164
158
|
self._schedule_old_states,
|
165
|
-
self._smile_props,
|
166
159
|
self.smile_hostname,
|
167
160
|
self.smile_hw_version,
|
168
161
|
self.smile_mac_address,
|
@@ -179,7 +172,6 @@ class Smile(SmileComm):
|
|
179
172
|
self._on_off_device,
|
180
173
|
self._opentherm_device,
|
181
174
|
self._request,
|
182
|
-
self._smile_props,
|
183
175
|
self._stretch_v2,
|
184
176
|
self._target_smile,
|
185
177
|
self.smile_hostname,
|
@@ -58,6 +58,11 @@ class SmileCommon:
|
|
58
58
|
self.smile_name: str
|
59
59
|
self.smile_type: str
|
60
60
|
|
61
|
+
@property
|
62
|
+
def heater_id(self) -> str:
|
63
|
+
"""Return the heater-id."""
|
64
|
+
return self._heater_id
|
65
|
+
|
61
66
|
def smile(self, name: str) -> bool:
|
62
67
|
"""Helper-function checking the smile-name."""
|
63
68
|
return self.smile_name == name
|
@@ -393,17 +393,6 @@ ZONE_THERMOSTATS: Final[tuple[str, ...]] = (
|
|
393
393
|
)
|
394
394
|
|
395
395
|
|
396
|
-
class SmileProps(TypedDict, total=False):
|
397
|
-
"""The SmileProps Data class."""
|
398
|
-
|
399
|
-
cooling_present: bool
|
400
|
-
gateway_id: str
|
401
|
-
heater_id: str
|
402
|
-
item_count: int
|
403
|
-
reboot: bool
|
404
|
-
smile_name: str
|
405
|
-
|
406
|
-
|
407
396
|
class ModuleData(TypedDict):
|
408
397
|
"""The Module data class."""
|
409
398
|
|
@@ -16,7 +16,6 @@ from plugwise.constants import (
|
|
16
16
|
OFF,
|
17
17
|
ActuatorData,
|
18
18
|
GwEntityData,
|
19
|
-
SmileProps,
|
20
19
|
)
|
21
20
|
from plugwise.helper import SmileHelper
|
22
21
|
from plugwise.util import remove_empty_platform_dicts
|
@@ -27,28 +26,19 @@ class SmileData(SmileHelper):
|
|
27
26
|
|
28
27
|
def __init__(self) -> None:
|
29
28
|
"""Init."""
|
30
|
-
|
29
|
+
super().__init__()
|
31
30
|
self._zones: dict[str, GwEntityData] = {}
|
32
|
-
SmileHelper.__init__(self)
|
33
31
|
|
34
32
|
def _all_entity_data(self) -> None:
|
35
33
|
"""Helper-function for get_all_gateway_entities().
|
36
34
|
|
37
|
-
Collect data for each entity and add to self.
|
35
|
+
Collect data for each entity and add to self.gw_entities.
|
38
36
|
"""
|
39
37
|
self._update_gw_entities()
|
40
38
|
if self.smile(ADAM):
|
41
39
|
self._update_zones()
|
42
40
|
self.gw_entities.update(self._zones)
|
43
41
|
|
44
|
-
self._smile_props["gateway_id"] = self._gateway_id
|
45
|
-
self._smile_props["item_count"] = self._count
|
46
|
-
self._smile_props["reboot"] = True
|
47
|
-
self._smile_props["smile_name"] = self.smile_name
|
48
|
-
if self._is_thermostat:
|
49
|
-
self._smile_props["heater_id"] = self._heater_id
|
50
|
-
self._smile_props["cooling_present"] = self._cooling_present
|
51
|
-
|
52
42
|
def _update_zones(self) -> None:
|
53
43
|
"""Helper-function for _all_entity_data() and async_update().
|
54
44
|
|
@@ -75,6 +75,7 @@ class SmileHelper(SmileCommon):
|
|
75
75
|
|
76
76
|
def __init__(self) -> None:
|
77
77
|
"""Set the constructor for this class."""
|
78
|
+
super().__init__()
|
78
79
|
self._endpoint: str
|
79
80
|
self._elga: bool
|
80
81
|
self._is_thermostat: bool
|
@@ -89,7 +90,16 @@ class SmileHelper(SmileCommon):
|
|
89
90
|
self.smile_model: str
|
90
91
|
self.smile_model_id: str | None
|
91
92
|
self.smile_version: version.Version
|
92
|
-
|
93
|
+
|
94
|
+
@property
|
95
|
+
def gateway_id(self) -> str:
|
96
|
+
"""Return the gateway-id."""
|
97
|
+
return self._gateway_id
|
98
|
+
|
99
|
+
@property
|
100
|
+
def item_count(self) -> int:
|
101
|
+
"""Return the item-count."""
|
102
|
+
return self._count
|
93
103
|
|
94
104
|
def _all_appliances(self) -> None:
|
95
105
|
"""Collect all appliances with relevant info.
|
@@ -233,7 +243,7 @@ class SmileHelper(SmileCommon):
|
|
233
243
|
appliance, "domestic_hot_water_mode_control_functionality"
|
234
244
|
)
|
235
245
|
# Skip orphaned heater_central (Core Issue #104433)
|
236
|
-
if appl.entity_id != self.
|
246
|
+
if appl.entity_id != self.heater_id:
|
237
247
|
return Munch()
|
238
248
|
return appl
|
239
249
|
case _ as s if s.endswith("_plug"):
|
@@ -344,7 +354,7 @@ class SmileHelper(SmileCommon):
|
|
344
354
|
|
345
355
|
# Get non-P1 data from APPLIANCES
|
346
356
|
measurements = DEVICE_MEASUREMENTS
|
347
|
-
if self._is_thermostat and entity_id == self.
|
357
|
+
if self._is_thermostat and entity_id == self.heater_id:
|
348
358
|
measurements = HEATER_CENTRAL_MEASUREMENTS
|
349
359
|
# Show the allowed dhw_modes (Loria only)
|
350
360
|
if self._dhw_allowed_modes:
|
@@ -619,7 +629,7 @@ class SmileHelper(SmileCommon):
|
|
619
629
|
|
620
630
|
Support added for Techneco Elga and Thercon Loria/Thermastage.
|
621
631
|
"""
|
622
|
-
if entity_id != self.
|
632
|
+
if entity_id != self.heater_id:
|
623
633
|
return
|
624
634
|
|
625
635
|
if "elga_status_code" in data:
|
@@ -7,7 +7,7 @@ from __future__ import annotations
|
|
7
7
|
|
8
8
|
# Dict as class
|
9
9
|
# Version detection
|
10
|
-
from plugwise.constants import NONE, OFF, GwEntityData
|
10
|
+
from plugwise.constants import NONE, OFF, GwEntityData
|
11
11
|
from plugwise.legacy.helper import SmileLegacyHelper
|
12
12
|
from plugwise.util import remove_empty_platform_dicts
|
13
13
|
|
@@ -15,22 +15,12 @@ from plugwise.util import remove_empty_platform_dicts
|
|
15
15
|
class SmileLegacyData(SmileLegacyHelper):
|
16
16
|
"""The Plugwise Smile main class."""
|
17
17
|
|
18
|
-
def __init__(self) -> None:
|
19
|
-
"""Init."""
|
20
|
-
self._smile_props: SmileProps
|
21
|
-
SmileLegacyHelper.__init__(self)
|
22
|
-
|
23
18
|
def _all_entity_data(self) -> None:
|
24
19
|
"""Helper-function for get_all_gateway_entities().
|
25
20
|
|
26
|
-
Collect data for each entity and add to self.
|
21
|
+
Collect data for each entity and add to self.gw_entities.
|
27
22
|
"""
|
28
23
|
self._update_gw_entities()
|
29
|
-
self._smile_props["gateway_id"] = self.gateway_id
|
30
|
-
self._smile_props["item_count"] = self._count
|
31
|
-
self._smile_props["smile_name"] = self.smile_name
|
32
|
-
if self._is_thermostat:
|
33
|
-
self._smile_props["heater_id"] = self._heater_id
|
34
24
|
|
35
25
|
def _update_gw_entities(self) -> None:
|
36
26
|
"""Helper-function for _all_entity_data() and async_update().
|
@@ -64,7 +64,9 @@ class SmileLegacyHelper(SmileCommon):
|
|
64
64
|
|
65
65
|
def __init__(self) -> None:
|
66
66
|
"""Set the constructor for this class."""
|
67
|
+
super().__init__()
|
67
68
|
self._appliances: etree.Element
|
69
|
+
self._gateway_id: str = NONE
|
68
70
|
self._is_thermostat: bool
|
69
71
|
self._loc_data: dict[str, ThermoLoc]
|
70
72
|
self._locations: etree.Element
|
@@ -75,7 +77,16 @@ class SmileLegacyHelper(SmileCommon):
|
|
75
77
|
self.smile_model: str
|
76
78
|
self.smile_version: Version
|
77
79
|
self.smile_zigbee_mac_address: str | None
|
78
|
-
|
80
|
+
|
81
|
+
@property
|
82
|
+
def gateway_id(self) -> str:
|
83
|
+
"""Return the gateway-id."""
|
84
|
+
return self._gateway_id
|
85
|
+
|
86
|
+
@property
|
87
|
+
def item_count(self) -> int:
|
88
|
+
"""Return the item-count."""
|
89
|
+
return self._count
|
79
90
|
|
80
91
|
def _all_appliances(self) -> None:
|
81
92
|
"""Collect all appliances with relevant info."""
|
@@ -125,7 +136,7 @@ class SmileLegacyHelper(SmileCommon):
|
|
125
136
|
continue
|
126
137
|
|
127
138
|
# Skip orphaned heater_central (Core Issue #104433)
|
128
|
-
if appl.pwclass == "heater_central" and appl.entity_id != self.
|
139
|
+
if appl.pwclass == "heater_central" and appl.entity_id != self.heater_id:
|
129
140
|
continue # pragma: no cover
|
130
141
|
|
131
142
|
self._create_gw_entities(appl)
|
@@ -173,11 +184,11 @@ class SmileLegacyHelper(SmileCommon):
|
|
173
184
|
|
174
185
|
Use the home_location or FAKE_APPL as entity id.
|
175
186
|
"""
|
176
|
-
self.
|
187
|
+
self._gateway_id = self._home_loc_id
|
177
188
|
if self.smile_type == "power":
|
178
|
-
self.
|
189
|
+
self._gateway_id = FAKE_APPL
|
179
190
|
|
180
|
-
self.gw_entities[self.
|
191
|
+
self.gw_entities[self._gateway_id] = {"dev_class": "gateway"}
|
181
192
|
self._count += 1
|
182
193
|
for key, value in {
|
183
194
|
"firmware": str(self.smile_version),
|
@@ -190,7 +201,7 @@ class SmileLegacyHelper(SmileCommon):
|
|
190
201
|
}.items():
|
191
202
|
if value is not None:
|
192
203
|
gw_key = cast(ApplianceType, key)
|
193
|
-
self.gw_entities[self.
|
204
|
+
self.gw_entities[self._gateway_id][gw_key] = value
|
194
205
|
self._count += 1
|
195
206
|
|
196
207
|
def _appliance_info_finder(self, appliance: etree, appl: Munch) -> Munch:
|
@@ -268,7 +279,7 @@ class SmileLegacyHelper(SmileCommon):
|
|
268
279
|
return data
|
269
280
|
|
270
281
|
measurements = DEVICE_MEASUREMENTS
|
271
|
-
if self._is_thermostat and entity_id == self.
|
282
|
+
if self._is_thermostat and entity_id == self.heater_id:
|
272
283
|
measurements = HEATER_CENTRAL_MEASUREMENTS
|
273
284
|
|
274
285
|
if (
|
@@ -282,7 +293,7 @@ class SmileLegacyHelper(SmileCommon):
|
|
282
293
|
|
283
294
|
# Anna: the Smile outdoor_temperature is present in the Home location
|
284
295
|
# For some Anna's LOCATIONS is empty, falling back to domain_objects!
|
285
|
-
if self._is_thermostat and entity_id == self.
|
296
|
+
if self._is_thermostat and entity_id == self._gateway_id:
|
286
297
|
locator = f"./location[@id='{self._home_loc_id}']/logs/point_log[type='outdoor_temperature']/period/measurement"
|
287
298
|
if (found := self._domain_objects.find(locator)) is not None:
|
288
299
|
value = format_measure(found.text, NONE)
|
@@ -19,7 +19,6 @@ from plugwise.constants import (
|
|
19
19
|
REQUIRE_APPLIANCES,
|
20
20
|
RULES,
|
21
21
|
GwEntityData,
|
22
|
-
SmileProps,
|
23
22
|
ThermoLoc,
|
24
23
|
)
|
25
24
|
from plugwise.exceptions import ConnectionFailedError, DataMissingError, PlugwiseError
|
@@ -41,7 +40,6 @@ class SmileLegacyAPI(SmileLegacyData):
|
|
41
40
|
_on_off_device: bool,
|
42
41
|
_opentherm_device: bool,
|
43
42
|
_request: Callable[..., Awaitable[Any]],
|
44
|
-
_smile_props: SmileProps,
|
45
43
|
_stretch_v2: bool,
|
46
44
|
_target_smile: str,
|
47
45
|
smile_hostname: str,
|
@@ -54,13 +52,13 @@ class SmileLegacyAPI(SmileLegacyData):
|
|
54
52
|
smile_zigbee_mac_address: str | None,
|
55
53
|
) -> None:
|
56
54
|
"""Set the constructor for this class."""
|
55
|
+
super().__init__()
|
57
56
|
self._cooling_present = False
|
58
57
|
self._is_thermostat = _is_thermostat
|
59
58
|
self._loc_data = _loc_data
|
60
59
|
self._on_off_device = _on_off_device
|
61
60
|
self._opentherm_device = _opentherm_device
|
62
61
|
self._request = _request
|
63
|
-
self._smile_props = _smile_props
|
64
62
|
self._stretch_v2 = _stretch_v2
|
65
63
|
self._target_smile = _target_smile
|
66
64
|
self.smile_hostname = smile_hostname
|
@@ -71,11 +69,15 @@ class SmileLegacyAPI(SmileLegacyData):
|
|
71
69
|
self.smile_type = smile_type
|
72
70
|
self.smile_version = smile_version
|
73
71
|
self.smile_zigbee_mac_address = smile_zigbee_mac_address
|
74
|
-
SmileLegacyData.__init__(self)
|
75
72
|
|
76
73
|
self._first_update = True
|
77
74
|
self._previous_day_number: str = "0"
|
78
75
|
|
76
|
+
@property
|
77
|
+
def cooling_present(self) -> bool:
|
78
|
+
"""Return the cooling capability."""
|
79
|
+
return False
|
80
|
+
|
79
81
|
async def full_xml_update(self) -> None:
|
80
82
|
"""Perform a first fetch of the Plugwise server XML data."""
|
81
83
|
self._domain_objects = await self._request(DOMAIN_OBJECTS)
|
@@ -18,11 +18,11 @@ from plugwise.constants import (
|
|
18
18
|
LOCATIONS,
|
19
19
|
MAX_SETPOINT,
|
20
20
|
MIN_SETPOINT,
|
21
|
+
NONE,
|
21
22
|
NOTIFICATIONS,
|
22
23
|
OFF,
|
23
24
|
RULES,
|
24
25
|
GwEntityData,
|
25
|
-
SmileProps,
|
26
26
|
ThermoLoc,
|
27
27
|
)
|
28
28
|
from plugwise.data import SmileData
|
@@ -51,7 +51,6 @@ class SmileAPI(SmileData):
|
|
51
51
|
_opentherm_device: bool,
|
52
52
|
_request: Callable[..., Awaitable[Any]],
|
53
53
|
_schedule_old_states: dict[str, dict[str, str]],
|
54
|
-
_smile_props: SmileProps,
|
55
54
|
smile_hostname: str | None,
|
56
55
|
smile_hw_version: str | None,
|
57
56
|
smile_mac_address: str | None,
|
@@ -62,6 +61,7 @@ class SmileAPI(SmileData):
|
|
62
61
|
smile_version: Version,
|
63
62
|
) -> None:
|
64
63
|
"""Set the constructor for this class."""
|
64
|
+
super().__init__()
|
65
65
|
self._cooling_present = _cooling_present
|
66
66
|
self._elga = _elga
|
67
67
|
self._is_thermostat = _is_thermostat
|
@@ -71,7 +71,6 @@ class SmileAPI(SmileData):
|
|
71
71
|
self._opentherm_device = _opentherm_device
|
72
72
|
self._request = _request
|
73
73
|
self._schedule_old_states = _schedule_old_states
|
74
|
-
self._smile_props = _smile_props
|
75
74
|
self.smile_hostname = smile_hostname
|
76
75
|
self.smile_hw_version = smile_hw_version
|
77
76
|
self.smile_mac_address = smile_mac_address
|
@@ -81,7 +80,11 @@ class SmileAPI(SmileData):
|
|
81
80
|
self.smile_type = smile_type
|
82
81
|
self.smile_version = smile_version
|
83
82
|
self.therms_with_offset_func: list[str] = []
|
84
|
-
|
83
|
+
|
84
|
+
@property
|
85
|
+
def cooling_present(self) -> bool:
|
86
|
+
"""Return the cooling capability."""
|
87
|
+
return self._cooling_present
|
85
88
|
|
86
89
|
async def full_xml_update(self) -> None:
|
87
90
|
"""Perform a first fetch of the Plugwise server XML data."""
|
@@ -121,8 +124,8 @@ class SmileAPI(SmileData):
|
|
121
124
|
self.get_all_gateway_entities()
|
122
125
|
# Set self._cooling_enabled - required for set_temperature(),
|
123
126
|
# also, check for a failed data-retrieval
|
124
|
-
if
|
125
|
-
heat_cooler = self.gw_entities[self.
|
127
|
+
if self.heater_id != NONE:
|
128
|
+
heat_cooler = self.gw_entities[self.heater_id]
|
126
129
|
if (
|
127
130
|
"binary_sensors" in heat_cooler
|
128
131
|
and "cooling_enabled" in heat_cooler["binary_sensors"]
|
@@ -131,7 +134,7 @@ class SmileAPI(SmileData):
|
|
131
134
|
"cooling_enabled"
|
132
135
|
]
|
133
136
|
else: # cover failed data-retrieval for P1
|
134
|
-
_ = self.gw_entities[self.
|
137
|
+
_ = self.gw_entities[self.gateway_id]["location"]
|
135
138
|
except KeyError as err:
|
136
139
|
raise DataMissingError("No Plugwise actual data received") from err
|
137
140
|
|
@@ -273,7 +276,7 @@ class SmileAPI(SmileData):
|
|
273
276
|
f"{valid}"
|
274
277
|
"</gateway_mode_control_functionality>"
|
275
278
|
)
|
276
|
-
uri = f"{APPLIANCES};id={self.
|
279
|
+
uri = f"{APPLIANCES};id={self.gateway_id}/gateway_mode_control"
|
277
280
|
await self.call_request(uri, method="put", data=data)
|
278
281
|
|
279
282
|
async def set_regulation_mode(self, mode: str) -> None:
|
@@ -1,39 +1,15 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: plugwise
|
3
|
-
Version: 1.7.
|
3
|
+
Version: 1.7.4
|
4
4
|
Summary: Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3.
|
5
|
-
Home-page: https://github.com/plugwise/python-plugwise
|
6
5
|
Author: Plugwise device owners
|
7
6
|
Maintainer: bouwew, CoMPaTech
|
8
|
-
License: MIT
|
9
|
-
|
10
|
-
Copyright (c) 2019 @laetificat, 2019-2020 @CoMPaTech & @bouwew, 2020-current @CoMPaTech, @bouwew & @brefra
|
11
|
-
|
12
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
13
|
-
of this software and associated documentation files (the "Software"), to deal
|
14
|
-
in the Software without restriction, including without limitation the rights
|
15
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
16
|
-
copies of the Software, and to permit persons to whom the Software is
|
17
|
-
furnished to do so, subject to the following conditions:
|
18
|
-
|
19
|
-
The above copyright notice and this permission notice shall be included in all
|
20
|
-
copies or substantial portions of the Software.
|
21
|
-
|
22
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
23
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
24
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
25
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
26
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
27
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
28
|
-
SOFTWARE.
|
29
|
-
|
7
|
+
License-Expression: MIT
|
30
8
|
Project-URL: Source Code, https://github.com/plugwise/python-plugwise
|
31
9
|
Project-URL: Bug Reports, https://github.com/plugwise/python-plugwise/issues
|
32
10
|
Keywords: home,automation,plugwise,module
|
33
|
-
Platform: any
|
34
11
|
Classifier: Development Status :: 5 - Production/Stable
|
35
12
|
Classifier: Intended Audience :: Developers
|
36
|
-
Classifier: License :: OSI Approved :: MIT License
|
37
13
|
Classifier: Operating System :: OS Independent
|
38
14
|
Classifier: Programming Language :: Python :: 3.12
|
39
15
|
Classifier: Programming Language :: Python :: 3.13
|
@@ -45,6 +21,7 @@ Requires-Dist: aiohttp
|
|
45
21
|
Requires-Dist: defusedxml
|
46
22
|
Requires-Dist: munch
|
47
23
|
Requires-Dist: python-dateutil
|
24
|
+
Dynamic: license-file
|
48
25
|
|
49
26
|
# Plugwise python module
|
50
27
|
|
@@ -1,18 +1,17 @@
|
|
1
1
|
[build-system]
|
2
|
-
requires = ["setuptools~=
|
2
|
+
requires = ["setuptools~=79.0"]
|
3
3
|
build-backend = "setuptools.build_meta"
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "plugwise"
|
7
|
-
version = "1.7.
|
8
|
-
license =
|
7
|
+
version = "1.7.4"
|
8
|
+
license = "MIT"
|
9
9
|
description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3."
|
10
10
|
readme = "README.md"
|
11
11
|
keywords = ["home", "automation", "plugwise", "module"]
|
12
12
|
classifiers = [
|
13
13
|
"Development Status :: 5 - Production/Stable",
|
14
14
|
"Intended Audience :: Developers",
|
15
|
-
"License :: OSI Approved :: MIT License",
|
16
15
|
"Operating System :: OS Independent",
|
17
16
|
"Programming Language :: Python :: 3.12",
|
18
17
|
"Programming Language :: Python :: 3.13",
|
@@ -38,7 +37,6 @@ dependencies = [
|
|
38
37
|
"Bug Reports" = "https://github.com/plugwise/python-plugwise/issues"
|
39
38
|
|
40
39
|
[tool.setuptools]
|
41
|
-
platforms = ["any"]
|
42
40
|
include-package-data = true
|
43
41
|
|
44
42
|
[tool.setuptools.package-data]
|
@@ -75,7 +73,6 @@ init-hook = """\
|
|
75
73
|
load-plugins = [
|
76
74
|
"pylint.extensions.code_style",
|
77
75
|
"pylint.extensions.typing",
|
78
|
-
"pylint_per_file_ignores",
|
79
76
|
]
|
80
77
|
persistent = false
|
81
78
|
extension-pkg-allow-list = [
|
@@ -366,12 +363,6 @@ enable = [
|
|
366
363
|
#"useless-suppression", # temporarily every now and then to clean them up
|
367
364
|
"use-symbolic-message-instead",
|
368
365
|
]
|
369
|
-
per-file-ignores = [
|
370
|
-
# redefined-outer-name: Tests reference fixtures in the test function
|
371
|
-
# use-implicit-booleaness-not-comparison: Tests need to validate that a list
|
372
|
-
# or a dict is returned
|
373
|
-
"/tests/:redefined-outer-name,use-implicit-booleaness-not-comparison",
|
374
|
-
]
|
375
366
|
|
376
367
|
[tool.pylint.REPORTS]
|
377
368
|
score = false
|
@@ -1,6 +1,3 @@
|
|
1
|
-
[metadata]
|
2
|
-
url = https://github.com/plugwise/python-plugwise
|
3
|
-
|
4
1
|
[codespell]
|
5
2
|
ignore-words-list = additionals,alle,alot,ba,bre,bund,currenty,datas,dof,dur,ether,farenheit,falsy,fo,haa,hass,hist,iam,iff,iif,incomfort,ines,ist,leeg,lightsensor,mut,nam,nd,pres,pullrequests,referer,resset,rime,ser,serie,sur,te,technik,ue,uint,unsecure,visability,wan,wanna,withing,zar
|
6
3
|
skip = ./.*,*.csv,*.json
|
@@ -342,10 +342,10 @@ class TestPlugwise: # pylint: disable=attribute-defined-outside-init
|
|
342
342
|
assert smile._timeout == 30
|
343
343
|
|
344
344
|
# Connect to the smile
|
345
|
-
|
345
|
+
smile_version = None
|
346
346
|
try:
|
347
|
-
|
348
|
-
assert
|
347
|
+
smile_version = await smile.connect()
|
348
|
+
assert smile_version is not None
|
349
349
|
assert smile._timeout == 10
|
350
350
|
return server, smile, client
|
351
351
|
except (
|
@@ -353,7 +353,7 @@ class TestPlugwise: # pylint: disable=attribute-defined-outside-init
|
|
353
353
|
pw_exceptions.InvalidXMLError,
|
354
354
|
pw_exceptions.InvalidAuthentication,
|
355
355
|
) as exception:
|
356
|
-
assert
|
356
|
+
assert smile_version is None
|
357
357
|
await self.disconnect(server, client)
|
358
358
|
raise exception
|
359
359
|
|
@@ -428,10 +428,10 @@ class TestPlugwise: # pylint: disable=attribute-defined-outside-init
|
|
428
428
|
assert smile._timeout == 30
|
429
429
|
|
430
430
|
# Connect to the smile
|
431
|
-
|
431
|
+
smile_version = None
|
432
432
|
try:
|
433
|
-
|
434
|
-
assert
|
433
|
+
smile_version = await smile.connect()
|
434
|
+
assert smile_version is not None
|
435
435
|
assert smile._timeout == 30
|
436
436
|
return server, smile, client
|
437
437
|
except (
|
@@ -439,7 +439,7 @@ class TestPlugwise: # pylint: disable=attribute-defined-outside-init
|
|
439
439
|
pw_exceptions.InvalidXMLError,
|
440
440
|
pw_exceptions.InvalidAuthentication,
|
441
441
|
) as exception:
|
442
|
-
assert
|
442
|
+
assert smile_version is None
|
443
443
|
await self.disconnect(server, client)
|
444
444
|
raise exception
|
445
445
|
|
plugwise-1.7.3a2/setup.py
DELETED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|