aioWiserHeatAPI 1.5.16__tar.gz → 1.5.18__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 (57) hide show
  1. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/PKG-INFO +11 -2
  2. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/README.md +10 -1
  3. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/__init__.py +1 -1
  4. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/devices.py +12 -3
  5. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/helpers/opentherm.py +70 -32
  6. aiowiserheatapi-1.5.18/aioWiserHeatAPI/helpers/version.py +48 -0
  7. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/rest_controller.py +19 -7
  8. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI.egg-info/PKG-INFO +11 -2
  9. aiowiserheatapi-1.5.16/aioWiserHeatAPI/helpers/version.py +0 -67
  10. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/LICENSE +0 -0
  11. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/automation.py +0 -0
  12. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/binary_sensor.py +0 -0
  13. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/boiler_interface.py +0 -0
  14. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/cli.py +0 -0
  15. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/const.py +0 -0
  16. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/discovery.py +0 -0
  17. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/exceptions.py +0 -0
  18. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/heating.py +0 -0
  19. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/heating_actuator.py +0 -0
  20. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/helpers/__init__.py +0 -0
  21. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/helpers/automations.py +0 -0
  22. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/helpers/battery.py +0 -0
  23. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/helpers/capabilities.py +0 -0
  24. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/helpers/cloud.py +0 -0
  25. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/helpers/device.py +0 -0
  26. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/helpers/equipment.py +0 -0
  27. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/helpers/extra_config.py +0 -0
  28. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/helpers/firmware.py +0 -0
  29. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/helpers/gps.py +0 -0
  30. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/helpers/misc.py +0 -0
  31. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/helpers/network.py +0 -0
  32. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/helpers/signal.py +0 -0
  33. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/helpers/special_times.py +0 -0
  34. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/helpers/status.py +0 -0
  35. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/helpers/temp.py +0 -0
  36. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/helpers/zigbee.py +0 -0
  37. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/hot_water.py +0 -0
  38. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/light.py +0 -0
  39. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/moments.py +0 -0
  40. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/pte.py +0 -0
  41. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/room.py +0 -0
  42. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/roomstat.py +0 -0
  43. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/schedule.py +0 -0
  44. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/shutter.py +0 -0
  45. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/smartplug.py +0 -0
  46. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/smartvalve.py +0 -0
  47. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/smokealarm.py +0 -0
  48. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/system.py +0 -0
  49. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/ufh.py +0 -0
  50. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI/wiserhub.py +0 -0
  51. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI.egg-info/SOURCES.txt +0 -0
  52. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI.egg-info/dependency_links.txt +0 -0
  53. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI.egg-info/entry_points.txt +0 -0
  54. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI.egg-info/requires.txt +0 -0
  55. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/aioWiserHeatAPI.egg-info/top_level.txt +0 -0
  56. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/setup.cfg +0 -0
  57. {aiowiserheatapi-1.5.16 → aiowiserheatapi-1.5.18}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aioWiserHeatAPI
3
- Version: 1.5.16
3
+ Version: 1.5.18
4
4
  Summary: An AsyncIO API for controlling the Drayton Wiser Heating system
5
5
  Home-page: https://github.com/msp1974/aioWiserHeatAPI
6
6
  Author: Mark Parker
@@ -18,7 +18,7 @@ Requires-Dist: aiohttp>=3.9.3
18
18
  Requires-Dist: aiofiles>=23.2.1
19
19
  Requires-Dist: pyyaml>=6.0.1
20
20
 
21
- # Drayton Wiser Hub API Async v1.5.16
21
+ # Drayton Wiser Hub API Async v1.5.18
22
22
 
23
23
  This repository contains a simple API which queries the Drayton Wiser Heating sysystem used in the UK.
24
24
 
@@ -72,6 +72,15 @@ Documentation available in [info.md](https://github.com/msp1974/wiserHeatAPIv2/b
72
72
 
73
73
  ## Changelog
74
74
 
75
+ ### v1.5.18
76
+
77
+ * Better handle client response exeption and fit into retry routing
78
+
79
+ ### v1.5.17
80
+
81
+ * Fixed error setting opentherm endpoint for fw above 4.32.46
82
+ * Added support for CFMT devices
83
+
75
84
  ### v1.5.16
76
85
 
77
86
  * Added support for v2 opentherm endpoint for fw above 4.32.46
@@ -1,4 +1,4 @@
1
- # Drayton Wiser Hub API Async v1.5.16
1
+ # Drayton Wiser Hub API Async v1.5.18
2
2
 
3
3
  This repository contains a simple API which queries the Drayton Wiser Heating sysystem used in the UK.
4
4
 
@@ -52,6 +52,15 @@ Documentation available in [info.md](https://github.com/msp1974/wiserHeatAPIv2/b
52
52
 
53
53
  ## Changelog
54
54
 
55
+ ### v1.5.18
56
+
57
+ * Better handle client response exeption and fit into retry routing
58
+
59
+ ### v1.5.17
60
+
61
+ * Fixed error setting opentherm endpoint for fw above 4.32.46
62
+ * Added support for CFMT devices
63
+
55
64
  ### v1.5.16
56
65
 
57
66
  * Added support for v2 opentherm endpoint for fw above 4.32.46
@@ -3,6 +3,6 @@ import logging
3
3
  name = "aioWiserHeatAPI"
4
4
  __all__ = ["wiserAPI", "wiserDiscovery"]
5
5
 
6
- __VERSION__ = "1.5.16"
6
+ __VERSION__ = "1.5.18"
7
7
 
8
8
  _LOGGER = logging.getLogger(__name__)
@@ -53,6 +53,7 @@ class _WiserDeviceTypeEnum(enum.Enum):
53
53
  SmokeAlarmDevice = "SmokeAlarmDevice"
54
54
  WindowDoorSensor = "BinarySensor"
55
55
  BoilerInterface = "BoilerInterface"
56
+ CFMT = "HeatingActuator"
56
57
 
57
58
 
58
59
  PRODUCT_TYPE_CONFIG = {
@@ -134,6 +135,13 @@ PRODUCT_TYPE_CONFIG = {
134
135
  "endpoint": WISERBOILERINTERFACE,
135
136
  "device_id_field": "DeviceId",
136
137
  },
138
+ "CFMT": {
139
+ "class": _WiserHeatingActuator,
140
+ "collection": _WiserHeatingActuatorCollection,
141
+ "endpoint": WISERHEATINGACTUATOR,
142
+ "heating": True,
143
+ "has_v2_equipment": True,
144
+ },
137
145
  }
138
146
 
139
147
 
@@ -197,9 +205,10 @@ class _WiserDeviceCollection:
197
205
 
198
206
  # If heating device add room id
199
207
  if device_config.get("heating"):
200
- device_info[0]["RoomId"] = self._get_temp_device_room_id(
201
- self._domain_data, device.get("id")
202
- )
208
+ if not device.get("RoomId"):
209
+ device_info[0]["RoomId"] = self._get_temp_device_room_id(
210
+ self._domain_data, device.get("id")
211
+ )
203
212
 
204
213
  # If schedule device add schedule
205
214
  if device_config.get("schedule_type"):
@@ -3,7 +3,7 @@ from ..rest_controller import WiserRestActionEnum, _WiserRestController
3
3
  from .temp import _WiserTemperatureFunctions as tf
4
4
 
5
5
 
6
- class _WiserOpenThermBoilerParameters(object):
6
+ class _WiserOpenThermBoilerParameters:
7
7
  """Data structure for Opentherm Boiler Parameters data"""
8
8
 
9
9
  def __init__(self, data: dict):
@@ -19,9 +19,7 @@ class _WiserOpenThermBoilerParameters(object):
19
19
 
20
20
  @property
21
21
  def ch_setpoint(self) -> bool:
22
- return tf._from_wiser_temp(
23
- self._data.get("maxChSetpoint", None), "current"
24
- )
22
+ return tf._from_wiser_temp(self._data.get("maxChSetpoint", None), "current")
25
23
 
26
24
  @property
27
25
  def ch_setpoint_lower_bound(self) -> bool:
@@ -45,9 +43,7 @@ class _WiserOpenThermBoilerParameters(object):
45
43
 
46
44
  @property
47
45
  def hw_setpoint(self) -> bool:
48
- return tf._from_wiser_temp(
49
- self._data.get("dhwSetpoint", None), "current"
50
- )
46
+ return tf._from_wiser_temp(self._data.get("dhwSetpoint", None), "current")
51
47
 
52
48
  @property
53
49
  def hw_setpoint_lower_bound(self) -> bool:
@@ -66,7 +62,7 @@ class _WiserOpenThermBoilerParameters(object):
66
62
  return self._data
67
63
 
68
64
 
69
- class _WiserOpenThermOperationalData(object):
65
+ class _WiserOpenThermOperationalData:
70
66
  """Data structure for Opentherm Boiler Parameters data"""
71
67
 
72
68
  def __init__(self, data):
@@ -99,9 +95,7 @@ class _WiserOpenThermOperationalData(object):
99
95
  @property
100
96
  def hw_temperature(self) -> str:
101
97
  """Get Dhw1Temperature"""
102
- return tf._from_wiser_temp(
103
- self._data.get("Dhw1Temperature", None), "current"
104
- )
98
+ return tf._from_wiser_temp(self._data.get("Dhw1Temperature", None), "current")
105
99
 
106
100
  @property
107
101
  def relative_modulation_level(self) -> int:
@@ -120,6 +114,58 @@ class _WiserOpenThermOperationalData(object):
120
114
  return self._data
121
115
 
122
116
 
117
+ class _WiserOpenThermExtendedDiagnostics:
118
+ """Data structure for Opentherm extended diagnostics."""
119
+
120
+ def __init__(self, data: dict[str, int | str]):
121
+ self._data = data
122
+
123
+ @property
124
+ def unsuccessful_burner_starts(self) -> int:
125
+ """Get unsuccessfulBurnerStarts"""
126
+ return self._data.get("unsuccessfulBurnerStarts", 0)
127
+
128
+ @property
129
+ def number_flame_signal_too_low(self) -> int:
130
+ """Get numberFlameSignalTooLow"""
131
+ return self._data.get("numberFlameSignalTooLow", 0)
132
+
133
+ @property
134
+ def oem_specific_service_code(self) -> int:
135
+ """Get oemSpecificServiceCode"""
136
+ return self._data.get("oemSpecificServiceCode", 0)
137
+
138
+ @property
139
+ def successful_burner_starts(self) -> int:
140
+ """Get successfulBurnerStarts"""
141
+ return self._data.get("successfulBurnerStarts", 0)
142
+
143
+ @property
144
+ def ch_pump_starts(self) -> int:
145
+ """Get chPumpStarts"""
146
+ return self._data.get("chPumpStarts", 0)
147
+
148
+ @property
149
+ def dhw_pump_or_valve_starts(self) -> int:
150
+ """Get dhwPumpOrValveStarts"""
151
+ return self._data.get("dhwPumpOrValveStarts", 0)
152
+
153
+ @property
154
+ def burner_starts_during_dhw_mode(self) -> int:
155
+ """Get burnerStartsDuringDhwMode"""
156
+ return self._data.get("burnerStartsDuringDhwMode", 0)
157
+
158
+ @property
159
+ def burner_hours(self) -> int:
160
+ """Get burnerHours"""
161
+ return self._data.get("burnerHours", 0)
162
+
163
+ @property
164
+ def ch_pump_hours(self) -> int:
165
+ """Get chPumpHours"""
166
+ return self._data.get("chPumpHours", 0)
167
+
168
+
123
169
  class _WiserOpentherm(object):
124
170
  """Data structure for Opentherm data"""
125
171
 
@@ -160,9 +206,7 @@ class _WiserOpentherm(object):
160
206
  @property
161
207
  def ch1_flow_setpoint(self) -> float:
162
208
  """Get ch1FlowSetpoint"""
163
- return tf._from_wiser_temp(
164
- self._data.get("ch1FlowSetpoint", None), "current"
165
- )
209
+ return tf._from_wiser_temp(self._data.get("ch1FlowSetpoint", None), "current")
166
210
 
167
211
  @property
168
212
  def ch2_flow_enabled(self) -> bool:
@@ -172,9 +216,7 @@ class _WiserOpentherm(object):
172
216
  @property
173
217
  def ch2_flow_setpoint(self) -> float:
174
218
  """Get ch2FlowSetpoint"""
175
- return tf._from_wiser_temp(
176
- self._data.get("ch2FlowSetpoint", None), "current"
177
- )
219
+ return tf._from_wiser_temp(self._data.get("ch2FlowSetpoint", None), "current")
178
220
 
179
221
  @property
180
222
  def connection_status(self) -> str:
@@ -194,9 +236,7 @@ class _WiserOpentherm(object):
194
236
  @property
195
237
  def hw_flow_setpoint(self) -> float:
196
238
  """Get dhwFlowSetpoint"""
197
- return tf._from_wiser_temp(
198
- self._data.get("dhwFlowSetpoint", None), "current"
199
- )
239
+ return tf._from_wiser_temp(self._data.get("dhwFlowSetpoint", None), "current")
200
240
 
201
241
  @property
202
242
  def operating_mode(self) -> str:
@@ -205,9 +245,7 @@ class _WiserOpentherm(object):
205
245
 
206
246
  @property
207
247
  def operational_data(self) -> _WiserOpenThermOperationalData:
208
- return _WiserOpenThermOperationalData(
209
- self._data.get("operationalData", {})
210
- )
248
+ return _WiserOpenThermOperationalData(self._data.get("operationalData", {}))
211
249
 
212
250
  @property
213
251
  def boiler_parameters(self) -> _WiserOpenThermBoilerParameters:
@@ -215,19 +253,21 @@ class _WiserOpentherm(object):
215
253
  self._data.get("preDefinedRemoteBoilerParameters", {})
216
254
  )
217
255
 
256
+ @property
257
+ def extended_diagnostics(self) -> _WiserOpenThermExtendedDiagnostics:
258
+ return _WiserOpenThermExtendedDiagnostics(
259
+ self._data.get("extendedDiagnostics", {})
260
+ )
261
+
218
262
  @property
219
263
  def room_setpoint(self) -> float:
220
264
  """Get roomTemperature"""
221
- return tf._from_wiser_temp(
222
- self._data.get("roomSetpoint", None), "current"
223
- )
265
+ return tf._from_wiser_temp(self._data.get("roomSetpoint", None), "current")
224
266
 
225
267
  @property
226
268
  def room_temperature(self) -> float:
227
269
  """Get roomTemperature"""
228
- return tf._from_wiser_temp(
229
- self._data.get("roomTemperature", None), "current"
230
- )
270
+ return tf._from_wiser_temp(self._data.get("roomTemperature", None), "current")
231
271
 
232
272
  @property
233
273
  def tracked_room_id(self) -> int:
@@ -238,9 +278,7 @@ class _WiserOpentherm(object):
238
278
  def json_data(self) -> dict:
239
279
  return self._data
240
280
 
241
- async def set_opentherm_parameter(
242
- self, endpoint: str, cmd_data: str
243
- ) -> bool:
281
+ async def set_opentherm_parameter(self, endpoint: str, cmd_data: str) -> bool:
244
282
  """Allow settign of opentherm param"""
245
283
  return await self._wiser_rest_controller._do_hub_action(
246
284
  WiserRestActionEnum.PATCH,
@@ -0,0 +1,48 @@
1
+ """Version helpers."""
2
+
3
+ from dataclasses import dataclass
4
+
5
+
6
+ @dataclass
7
+ class Version:
8
+ """Class to handle PEP440 versions."""
9
+
10
+ version: str
11
+
12
+ def __gt__(self, other):
13
+ if isinstance(other, Version):
14
+ return self._version_compare(self.version, other.version) == 1
15
+
16
+ def __ge__(self, other):
17
+ if isinstance(other, Version):
18
+ return self.__eq__(other) or self.__gt__(other)
19
+
20
+ def __lt__(self, other):
21
+ if isinstance(other, Version):
22
+ return self._version_compare(self.version, other.version) == -1
23
+
24
+ def __le__(self, other):
25
+ if isinstance(other, Version):
26
+ return self.__eq__(other) or self.__lt__(other)
27
+
28
+ def __eq__(self, other):
29
+ if isinstance(other, Version):
30
+ return self._version_compare(self.version, other.version) == 0
31
+
32
+ def _version_compare(self, v1: str, v2: str) -> int:
33
+ version1 = v1.replace("-", ".").split(".")
34
+ version2 = v2.replace("-", ".").split(".")
35
+
36
+ length = max(len(version1), len(version2))
37
+
38
+ # Compare each component of the version strings.
39
+ for i in range(length):
40
+ v1_itm = int(version1[i]) if version1[i].isdigit() else version1[i]
41
+ v2_itm = int(version2[i]) if version2[i].isdigit() else version2[i]
42
+
43
+ if v1_itm > v2_itm:
44
+ return 1
45
+ if v1_itm < v2_itm:
46
+ return -1
47
+
48
+ return 0
@@ -9,6 +9,7 @@ from datetime import datetime
9
9
  from typing import Optional
10
10
 
11
11
  import aiohttp
12
+ import aiohttp.client_exceptions
12
13
  import aiohttp.http_exceptions
13
14
 
14
15
  from . import _LOGGER
@@ -95,7 +96,7 @@ class _WiserRestController(object):
95
96
  http_version = aiohttp.HttpVersion11
96
97
  self._last_exception = None
97
98
 
98
- for i in range(0, 5):
99
+ for i in range(5):
99
100
  if i > 0:
100
101
  await asyncio.sleep(REST_RETRY_BACKOFF[i])
101
102
  try:
@@ -120,7 +121,7 @@ class _WiserRestController(object):
120
121
  "Request successful and took %ss",
121
122
  (datetime.now() - start_time).total_seconds(),
122
123
  )
123
- return response
124
+
124
125
  except WiserHubRESTError as ex:
125
126
  # if json error try http1.1
126
127
  _LOGGER.debug("%s. Retrying in %.1fs", ex, REST_RETRY_BACKOFF[i])
@@ -135,19 +136,25 @@ class _WiserRestController(object):
135
136
  # Connection timed out or failed. Try it again
136
137
  _LOGGER.debug("%s. Retrying in %.1fs", ex, REST_RETRY_BACKOFF[i])
137
138
  self._last_exception = ex
139
+ except Exception as ex:
140
+ # Unknown error
141
+ _LOGGER.debug("%s. Retrying in %.1fs", ex, REST_RETRY_BACKOFF[i])
142
+ self._last_exception = ex
143
+ else:
144
+ return response
138
145
 
139
146
  raise WiserHubConnectionError(self._last_exception)
140
147
 
141
- async def _execute_request( # noqa
148
+ async def _execute_request(
142
149
  self,
143
150
  action: WiserRestActionEnum,
144
151
  url: str,
145
- data: dict = None,
152
+ data: dict | None = None,
146
153
  raise_for_endpoint_error: bool = True,
147
154
  http_version=aiohttp.HttpVersion11,
148
155
  ):
149
- """
150
- Send request to hub and raise errors if fails
156
+ """Send request to hub and raise errors if fails.
157
+
151
158
  param url: url of hub rest api endpoint
152
159
  param patchData: json object containing command and values to set
153
160
  return: boolean
@@ -224,7 +231,10 @@ class _WiserRestController(object):
224
231
  f"Connection error trying to communicate with Wiser Hub "
225
232
  f"{self._wiser_connection_info.host} for url {url}. Error is {ex}"
226
233
  ) from ex
227
- except aiohttp.http_exceptions.TransferEncodingError as ex:
234
+ except (
235
+ aiohttp.client_exceptions.ClientPayloadError,
236
+ aiohttp.http_exceptions.TransferEncodingError,
237
+ ) as ex:
228
238
  raise WiserHubConnectionError(
229
239
  f"Response payload incomplete error trying to communicate with Wiser Hub "
230
240
  f"{self._wiser_connection_info.host} for url {url}. Error is {ex}"
@@ -363,4 +373,6 @@ class _WiserRestController(object):
363
373
  f"{schedule_type}/{schedule_id}",
364
374
  schedule_data,
365
375
  )
376
+ else:
377
+ result = None
366
378
  return result
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aioWiserHeatAPI
3
- Version: 1.5.16
3
+ Version: 1.5.18
4
4
  Summary: An AsyncIO API for controlling the Drayton Wiser Heating system
5
5
  Home-page: https://github.com/msp1974/aioWiserHeatAPI
6
6
  Author: Mark Parker
@@ -18,7 +18,7 @@ Requires-Dist: aiohttp>=3.9.3
18
18
  Requires-Dist: aiofiles>=23.2.1
19
19
  Requires-Dist: pyyaml>=6.0.1
20
20
 
21
- # Drayton Wiser Hub API Async v1.5.16
21
+ # Drayton Wiser Hub API Async v1.5.18
22
22
 
23
23
  This repository contains a simple API which queries the Drayton Wiser Heating sysystem used in the UK.
24
24
 
@@ -72,6 +72,15 @@ Documentation available in [info.md](https://github.com/msp1974/wiserHeatAPIv2/b
72
72
 
73
73
  ## Changelog
74
74
 
75
+ ### v1.5.18
76
+
77
+ * Better handle client response exeption and fit into retry routing
78
+
79
+ ### v1.5.17
80
+
81
+ * Fixed error setting opentherm endpoint for fw above 4.32.46
82
+ * Added support for CFMT devices
83
+
75
84
  ### v1.5.16
76
85
 
77
86
  * Added support for v2 opentherm endpoint for fw above 4.32.46
@@ -1,67 +0,0 @@
1
- """Version helpers."""
2
-
3
- from dataclasses import dataclass
4
-
5
-
6
- @dataclass
7
- class Version:
8
- """Class to handle PEP440 versions."""
9
-
10
- version: str
11
-
12
- def __gt__(self, other):
13
- if isinstance(other, Version):
14
- return (
15
- self.major >= other.major
16
- and self.minor >= other.minor
17
- and self.micro > other.micro
18
- )
19
-
20
- def __ge__(self, other):
21
- if isinstance(other, Version):
22
- return self.__eq__(other) or self.__gt__(other)
23
-
24
- def __lt__(self, other):
25
- if isinstance(other, Version):
26
- return (
27
- self.major <= other.major
28
- and self.minor <= other.minor
29
- and self.micro < other.micro
30
- )
31
-
32
- def __le__(self, other):
33
- if isinstance(other, Version):
34
- return self.__eq__(other) or self.__lt__(other)
35
-
36
- def __eq__(self, other):
37
- if isinstance(other, Version):
38
- return (
39
- self.major == other.major
40
- and self.minor == other.minor
41
- and self.micro == other.micro
42
- )
43
-
44
- @property
45
- def major(self) -> int:
46
- """Get major version."""
47
- try:
48
- return self.version.split(".")[0]
49
- except IndexError:
50
- return None
51
-
52
- @property
53
- def minor(self) -> int:
54
- """Get minor version."""
55
- try:
56
- return self.version.split(".")[1]
57
- except IndexError:
58
- return None
59
-
60
- @property
61
- def micro(self) -> int:
62
- """Get micro version."""
63
- try:
64
- full_micro = self.version.split(".")[2]
65
- return full_micro.split("-")[0]
66
- except IndexError:
67
- return None