plugwise 0.38.1__tar.gz → 0.38.3__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.
Files changed (32) hide show
  1. {plugwise-0.38.1 → plugwise-0.38.3}/PKG-INFO +1 -1
  2. {plugwise-0.38.1 → plugwise-0.38.3}/plugwise/__init__.py +7 -3
  3. {plugwise-0.38.1 → plugwise-0.38.3}/plugwise/constants.py +2 -1
  4. {plugwise-0.38.1 → plugwise-0.38.3}/plugwise/legacy/smile.py +2 -2
  5. {plugwise-0.38.1 → plugwise-0.38.3}/plugwise/smile.py +8 -6
  6. {plugwise-0.38.1 → plugwise-0.38.3}/plugwise.egg-info/PKG-INFO +1 -1
  7. {plugwise-0.38.1 → plugwise-0.38.3}/pyproject.toml +1 -1
  8. {plugwise-0.38.1 → plugwise-0.38.3}/tests/test_init.py +3 -1
  9. {plugwise-0.38.1 → plugwise-0.38.3}/LICENSE +0 -0
  10. {plugwise-0.38.1 → plugwise-0.38.3}/README.md +0 -0
  11. {plugwise-0.38.1 → plugwise-0.38.3}/plugwise/common.py +0 -0
  12. {plugwise-0.38.1 → plugwise-0.38.3}/plugwise/data.py +0 -0
  13. {plugwise-0.38.1 → plugwise-0.38.3}/plugwise/exceptions.py +0 -0
  14. {plugwise-0.38.1 → plugwise-0.38.3}/plugwise/helper.py +0 -0
  15. {plugwise-0.38.1 → plugwise-0.38.3}/plugwise/legacy/data.py +0 -0
  16. {plugwise-0.38.1 → plugwise-0.38.3}/plugwise/legacy/helper.py +0 -0
  17. {plugwise-0.38.1 → plugwise-0.38.3}/plugwise/py.typed +0 -0
  18. {plugwise-0.38.1 → plugwise-0.38.3}/plugwise/util.py +0 -0
  19. {plugwise-0.38.1 → plugwise-0.38.3}/plugwise.egg-info/SOURCES.txt +0 -0
  20. {plugwise-0.38.1 → plugwise-0.38.3}/plugwise.egg-info/dependency_links.txt +0 -0
  21. {plugwise-0.38.1 → plugwise-0.38.3}/plugwise.egg-info/requires.txt +0 -0
  22. {plugwise-0.38.1 → plugwise-0.38.3}/plugwise.egg-info/top_level.txt +0 -0
  23. {plugwise-0.38.1 → plugwise-0.38.3}/setup.cfg +0 -0
  24. {plugwise-0.38.1 → plugwise-0.38.3}/setup.py +0 -0
  25. {plugwise-0.38.1 → plugwise-0.38.3}/tests/test_adam.py +0 -0
  26. {plugwise-0.38.1 → plugwise-0.38.3}/tests/test_anna.py +0 -0
  27. {plugwise-0.38.1 → plugwise-0.38.3}/tests/test_generic.py +0 -0
  28. {plugwise-0.38.1 → plugwise-0.38.3}/tests/test_legacy_anna.py +0 -0
  29. {plugwise-0.38.1 → plugwise-0.38.3}/tests/test_legacy_generic.py +0 -0
  30. {plugwise-0.38.1 → plugwise-0.38.3}/tests/test_legacy_p1.py +0 -0
  31. {plugwise-0.38.1 → plugwise-0.38.3}/tests/test_legacy_stretch.py +0 -0
  32. {plugwise-0.38.1 → plugwise-0.38.3}/tests/test_p1.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: plugwise
3
- Version: 0.38.1
3
+ Version: 0.38.3
4
4
  Summary: Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3.
5
5
  Home-page: https://github.com/plugwise/python-plugwise
6
6
  Author: Plugwise device owners
@@ -5,6 +5,7 @@ Plugwise backend module for Home Assistant Core.
5
5
  from __future__ import annotations
6
6
 
7
7
  from plugwise.constants import (
8
+ DEFAULT_LEGACY_TIMEOUT,
8
9
  DEFAULT_PORT,
9
10
  DEFAULT_TIMEOUT,
10
11
  DEFAULT_USERNAME,
@@ -46,7 +47,7 @@ class Smile(SmileComm):
46
47
  websession: aiohttp.ClientSession,
47
48
  username: str = DEFAULT_USERNAME,
48
49
  port: int = DEFAULT_PORT,
49
- timeout: float = DEFAULT_TIMEOUT,
50
+ timeout: float = DEFAULT_LEGACY_TIMEOUT,
50
51
 
51
52
  ) -> None:
52
53
  """Set the constructor for this class."""
@@ -128,6 +129,7 @@ class Smile(SmileComm):
128
129
  self._smile_api = SmileAPI(
129
130
  self._host,
130
131
  self._passwd,
132
+ self._timeout,
131
133
  self._websession,
132
134
  self._cooling_present,
133
135
  self._elga,
@@ -147,10 +149,10 @@ class Smile(SmileComm):
147
149
  self.smile_type,
148
150
  self._user,
149
151
  self._port,
150
- self._timeout,
151
152
  ) if not self.smile_legacy else SmileLegacyAPI(
152
153
  self._host,
153
154
  self._passwd,
155
+ self._timeout,
154
156
  self._websession,
155
157
  self._is_thermostat,
156
158
  self._on_off_device,
@@ -168,7 +170,6 @@ class Smile(SmileComm):
168
170
  self.smile_zigbee_mac_address,
169
171
  self._user,
170
172
  self._port,
171
- self._timeout,
172
173
  )
173
174
 
174
175
  # Update all endpoints on first connect
@@ -192,6 +193,9 @@ class Smile(SmileComm):
192
193
  else:
193
194
  model = await self._smile_detect_legacy(result, dsmrmain, model)
194
195
 
196
+ if not self.smile_legacy:
197
+ self._timeout = DEFAULT_TIMEOUT
198
+
195
199
  if model == "Unknown" or self.smile_fw_version is None: # pragma: no cover
196
200
  # Corner case check
197
201
  LOGGER.error(
@@ -32,7 +32,8 @@ VOLUME_CUBIC_METERS_PER_HOUR: Final = "m³/h"
32
32
 
33
33
  ADAM: Final = "Adam"
34
34
  ANNA: Final = "Smile Anna"
35
- DEFAULT_TIMEOUT: Final = 30
35
+ DEFAULT_TIMEOUT: Final = 10
36
+ DEFAULT_LEGACY_TIMEOUT: Final = 30
36
37
  DEFAULT_USERNAME: Final = "smile"
37
38
  DEFAULT_PORT: Final = 80
38
39
  DEFAULT_PW_MAX: Final = 30.0
@@ -10,7 +10,6 @@ from typing import Any
10
10
  from plugwise.constants import (
11
11
  APPLIANCES,
12
12
  DEFAULT_PORT,
13
- DEFAULT_TIMEOUT,
14
13
  DEFAULT_USERNAME,
15
14
  DOMAIN_OBJECTS,
16
15
  LOCATIONS,
@@ -41,6 +40,7 @@ class SmileLegacyAPI(SmileComm, SmileLegacyData):
41
40
  self,
42
41
  host: str,
43
42
  password: str,
43
+ timeout: float,
44
44
  websession: aiohttp.ClientSession,
45
45
  _is_thermostat: bool,
46
46
  _on_off_device: bool,
@@ -58,7 +58,6 @@ class SmileLegacyAPI(SmileComm, SmileLegacyData):
58
58
  smile_zigbee_mac_address: str | None,
59
59
  username: str = DEFAULT_USERNAME,
60
60
  port: int = DEFAULT_PORT,
61
- timeout: float = DEFAULT_TIMEOUT,
62
61
  ) -> None:
63
62
  """Set the constructor for this class."""
64
63
  super().__init__(
@@ -77,6 +76,7 @@ class SmileLegacyAPI(SmileComm, SmileLegacyData):
77
76
  self._opentherm_device = _opentherm_device
78
77
  self._stretch_v2 = _stretch_v2
79
78
  self._target_smile = _target_smile
79
+ self._timeout = timeout
80
80
  self.loc_data = loc_data
81
81
  self.smile_fw_version = smile_fw_version
82
82
  self.smile_hostname = smile_hostname
@@ -12,7 +12,6 @@ from plugwise.constants import (
12
12
  ANNA,
13
13
  APPLIANCES,
14
14
  DEFAULT_PORT,
15
- DEFAULT_TIMEOUT,
16
15
  DEFAULT_USERNAME,
17
16
  DOMAIN_OBJECTS,
18
17
  GATEWAY_REBOOT,
@@ -47,6 +46,7 @@ class SmileAPI(SmileComm, SmileData):
47
46
  self,
48
47
  host: str,
49
48
  password: str,
49
+ timeout: float,
50
50
  websession: aiohttp.ClientSession,
51
51
  _cooling_present: bool,
52
52
  _elga: bool,
@@ -66,8 +66,6 @@ class SmileAPI(SmileComm, SmileData):
66
66
  smile_type: str,
67
67
  username: str = DEFAULT_USERNAME,
68
68
  port: int = DEFAULT_PORT,
69
- timeout: float = DEFAULT_TIMEOUT,
70
-
71
69
  ) -> None:
72
70
  """Set the constructor for this class."""
73
71
  super().__init__(
@@ -87,6 +85,7 @@ class SmileAPI(SmileComm, SmileData):
87
85
  self._on_off_device = _on_off_device
88
86
  self._opentherm_device = _opentherm_device
89
87
  self._schedule_old_states = _schedule_old_states
88
+ self._timeout = timeout
90
89
  self.gateway_id = gateway_id
91
90
  self.loc_data = loc_data
92
91
  self.smile_fw_version = smile_fw_version
@@ -164,9 +163,12 @@ class SmileAPI(SmileComm, SmileData):
164
163
  temperature: float,
165
164
  ) -> None:
166
165
  """Set the maximum boiler- or DHW-setpoint on the Central Heating boiler or the temperature-offset on a Thermostat."""
167
- if key == "temperature_offset":
168
- await self.set_offset(dev_id, temperature)
169
- return
166
+ match key:
167
+ case "temperature_offset":
168
+ await self.set_offset(dev_id, temperature)
169
+ return
170
+ case "max_dhw_temperature":
171
+ key = "domestic_hot_water_setpoint"
170
172
 
171
173
  temp = str(temperature)
172
174
  thermostat_id: str | None = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: plugwise
3
- Version: 0.38.1
3
+ Version: 0.38.3
4
4
  Summary: Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3.
5
5
  Home-page: https://github.com/plugwise/python-plugwise
6
6
  Author: Plugwise device owners
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "plugwise"
7
- version = "0.38.1"
7
+ version = "0.38.3"
8
8
  license = {file = "LICENSE"}
9
9
  description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3."
10
10
  readme = "README.md"
@@ -552,8 +552,10 @@ class TestPlugwise: # pylint: disable=attribute-defined-outside-init
552
552
  await smile.full_update_device()
553
553
  smile.get_all_devices()
554
554
  data = await smile.async_update()
555
+ assert smile._timeout == 30
555
556
  else:
556
557
  data = await smile.async_update()
558
+ assert smile._timeout == 10
557
559
  else:
558
560
  _LOGGER.info("Asserting updated testdata:")
559
561
  data = await smile.async_update()
@@ -914,7 +916,7 @@ class TestPlugwise: # pylint: disable=attribute-defined-outside-init
914
916
  tinker_max_boiler_temp_passed = False
915
917
  new_temp = 60.0
916
918
  _LOGGER.info("- Adjusting temperature to %s", new_temp)
917
- for test in ["maximum_boiler_temperature", "bogus_temperature"]:
919
+ for test in ["maximum_boiler_temperature", "max_dhw_temperature", "bogus_temperature"]:
918
920
  _LOGGER.info(" + for %s", test)
919
921
  try:
920
922
  await smile.set_number("dummy", test, new_temp)
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