aioWiserHeatAPI 1.6.0__tar.gz → 1.6.2__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 (61) hide show
  1. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/PKG-INFO +9 -2
  2. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/README.md +8 -1
  3. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/__init__.py +1 -1
  4. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/devices.py +35 -107
  5. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/helpers/misc.py +0 -4
  6. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/ptc.py +0 -9
  7. aiowiserheatapi-1.6.2/aioWiserHeatAPI/temp_humidity.py +50 -0
  8. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI.egg-info/PKG-INFO +9 -2
  9. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI.egg-info/SOURCES.txt +1 -0
  10. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/LICENSE +0 -0
  11. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/automation.py +0 -0
  12. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/binary_sensor.py +0 -0
  13. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/boiler_interface.py +0 -0
  14. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/button_panel.py +0 -0
  15. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/cli.py +0 -0
  16. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/const.py +0 -0
  17. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/discovery.py +0 -0
  18. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/exceptions.py +0 -0
  19. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/heating.py +0 -0
  20. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/heating_actuator.py +0 -0
  21. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/helpers/__init__.py +0 -0
  22. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/helpers/automations.py +0 -0
  23. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/helpers/battery.py +0 -0
  24. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/helpers/capabilities.py +0 -0
  25. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/helpers/cloud.py +0 -0
  26. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/helpers/device.py +0 -0
  27. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/helpers/equipment.py +0 -0
  28. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/helpers/extra_config.py +0 -0
  29. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/helpers/firmware.py +0 -0
  30. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/helpers/gps.py +0 -0
  31. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/helpers/network.py +0 -0
  32. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/helpers/opentherm.py +0 -0
  33. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/helpers/signal.py +0 -0
  34. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/helpers/special_times.py +0 -0
  35. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/helpers/status.py +0 -0
  36. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/helpers/temp.py +0 -0
  37. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/helpers/threshold.py +0 -0
  38. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/helpers/uiconfiguration.py +0 -0
  39. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/helpers/version.py +0 -0
  40. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/helpers/zigbee.py +0 -0
  41. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/hot_water.py +0 -0
  42. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/light.py +0 -0
  43. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/moments.py +0 -0
  44. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/pte.py +0 -0
  45. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/rest_controller.py +0 -0
  46. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/room.py +0 -0
  47. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/roomstat.py +0 -0
  48. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/schedule.py +0 -0
  49. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/shutter.py +0 -0
  50. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/smartplug.py +0 -0
  51. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/smartvalve.py +0 -0
  52. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/smokealarm.py +0 -0
  53. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/system.py +0 -0
  54. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/ufh.py +0 -0
  55. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI/wiserhub.py +0 -0
  56. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI.egg-info/dependency_links.txt +0 -0
  57. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI.egg-info/entry_points.txt +0 -0
  58. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI.egg-info/requires.txt +0 -0
  59. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/aioWiserHeatAPI.egg-info/top_level.txt +0 -0
  60. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/setup.cfg +0 -0
  61. {aiowiserheatapi-1.6.0 → aiowiserheatapi-1.6.2}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aioWiserHeatAPI
3
- Version: 1.6.0
3
+ Version: 1.6.2
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.6.0
21
+ # Drayton Wiser Hub API Async v1.6.2
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,13 @@ Documentation available in [info.md](https://github.com/msp1974/wiserHeatAPIv2/b
72
72
 
73
73
  ## Changelog
74
74
 
75
+ ### v1.6.2
76
+ * Refactor: Removed unused imports causing error in python3.13
77
+ * Fix: Add equipment data during deviuce build process
78
+
79
+ ### v1.6.1
80
+ * Added: support for temperature and humidity sensors
81
+
75
82
  ### v1.6.0
76
83
  * Refactored how devices are enumerated
77
84
  * BREAKING CHANGE - threshold sensor is now a device attribute and not its own device
@@ -1,4 +1,4 @@
1
- # Drayton Wiser Hub API Async v1.6.0
1
+ # Drayton Wiser Hub API Async v1.6.2
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,13 @@ Documentation available in [info.md](https://github.com/msp1974/wiserHeatAPIv2/b
52
52
 
53
53
  ## Changelog
54
54
 
55
+ ### v1.6.2
56
+ * Refactor: Removed unused imports causing error in python3.13
57
+ * Fix: Add equipment data during deviuce build process
58
+
59
+ ### v1.6.1
60
+ * Added: support for temperature and humidity sensors
61
+
55
62
  ### v1.6.0
56
63
  * Refactored how devices are enumerated
57
64
  * BREAKING CHANGE - threshold sensor is now a device attribute and not its own device
@@ -3,6 +3,6 @@ import logging
3
3
  name = "aioWiserHeatAPI"
4
4
  __all__ = ["wiserAPI", "wiserDiscovery"]
5
5
 
6
- __VERSION__ = "1.6.0"
6
+ __VERSION__ = "1.6.2"
7
7
 
8
8
  _LOGGER = logging.getLogger(__name__)
@@ -2,14 +2,12 @@
2
2
  Module to manage all devices
3
3
  """
4
4
 
5
- import enum
6
5
  from dataclasses import dataclass
7
6
  from typing import Any
8
7
 
9
8
  from .binary_sensor import (
10
9
  _WiserBinarySensor,
11
10
  _WiserBinarySensorCollection,
12
- _WiserWindowDoorSensor,
13
11
  )
14
12
  from .boiler_interface import _WiserBoilerInterface, _WiserBoilerInterfaceCollection
15
13
  from .button_panel import _WiserButtonPanel, _WiserButtonPanelCollection
@@ -46,6 +44,7 @@ from .shutter import _WiserShutter, _WiserShutterCollection
46
44
  from .smartplug import _WiserSmartPlug, _WiserSmartPlugCollection
47
45
  from .smartvalve import _WiserSmartValve, _WiserSmartValveCollection
48
46
  from .smokealarm import _WiserSmokeAlarm, _WiserSmokeAlarmCollection
47
+ from .temp_humidity import _WiserTempHumidity, _WiserTempHumidityCollection
49
48
  from .ufh import _WiserUFHController, _WiserUFHControllerCollection
50
49
 
51
50
 
@@ -143,6 +142,11 @@ PRODUCT_TYPE_CONFIG = {
143
142
  collection=_WiserButtonPanelCollection,
144
143
  endpoint=WISERBUTTONPANEL,
145
144
  ),
145
+ "TempHumidity": DeviceConfig(
146
+ device_class=_WiserTempHumidity,
147
+ collection=_WiserTempHumidityCollection,
148
+ endpoint=None,
149
+ ),
146
150
  }
147
151
 
148
152
  ANCILLARY_SENSOR_CONFIG = {
@@ -159,110 +163,6 @@ ANCILLARY_SENSOR_CONFIG = {
159
163
  }
160
164
 
161
165
 
162
- class _WiserDeviceTypeEnum(enum.Enum):
163
- iTRV = "SmartValve"
164
- RoomStat = "RoomStat"
165
- SmartPlug = "SmartPlug"
166
- HeatingActuator = "HeatingActuator"
167
- UnderFloorHeating = "UnderFloorHeating"
168
- Shutter = "Shutter"
169
- OnOffLight = "Light"
170
- DimmableLight = "Light"
171
- PowerTagE = "PTE"
172
- SmokeAlarmDevice = "SmokeAlarmDevice"
173
- WindowDoorSensor = "BinarySensor"
174
- BoilerInterface = "BoilerInterface"
175
- CFMT = "HeatingActuator"
176
- ButtonPanel = "ButtonPanel"
177
-
178
-
179
- PRODUCT_TYPE_CONFIG_OLD = {
180
- "iTRV": {
181
- "class": _WiserSmartValve,
182
- "collection": _WiserSmartValveCollection,
183
- "endpoint": WISERSMARTVALVE,
184
- "heating": True,
185
- },
186
- "RoomStat": {
187
- "class": _WiserRoomStat,
188
- "collection": _WiserRoomStatCollection,
189
- "endpoint": WISERROOMSTAT,
190
- "heating": True,
191
- },
192
- "HeatingActuator": {
193
- "class": _WiserHeatingActuator,
194
- "collection": _WiserHeatingActuatorCollection,
195
- "endpoint": WISERHEATINGACTUATOR,
196
- "heating": True,
197
- "has_v2_equipment": True,
198
- },
199
- "UnderFloorHeating": {
200
- "class": _WiserUFHController,
201
- "collection": _WiserUFHControllerCollection,
202
- "endpoint": WISERUFHCONTROLLER,
203
- "heating": True,
204
- },
205
- "SmartPlug": {
206
- "class": _WiserSmartPlug,
207
- "collection": _WiserSmartPlugCollection,
208
- "endpoint": WISERSMARTPLUG,
209
- "schedule_type": WiserScheduleTypeEnum.onoff,
210
- "has_v2_equipment": True,
211
- },
212
- "Shutter": {
213
- "class": _WiserShutter,
214
- "collection": _WiserShutterCollection,
215
- "endpoint": WISERSHUTTER,
216
- "schedule_type": WiserScheduleTypeEnum.level,
217
- },
218
- "OnOffLight": {
219
- "class": _WiserLight,
220
- "collection": _WiserLightCollection,
221
- "endpoint": WISERLIGHT,
222
- "schedule_type": WiserScheduleTypeEnum.level,
223
- },
224
- "DimmableLight": {
225
- "class": _WiserDimmableLight,
226
- "collection": _WiserLightCollection,
227
- "endpoint": WISERLIGHT,
228
- "schedule_type": WiserScheduleTypeEnum.level,
229
- },
230
- "PowerTagE": {
231
- "class": _WiserPowerTagEnergy,
232
- "collection": _WiserPowerTagEnergyCollection,
233
- "endpoint": WISERPOWERTAGENERGY,
234
- "has_v2_equipment": True,
235
- },
236
- "SmokeAlarmDevice": {
237
- "class": _WiserSmokeAlarm,
238
- "collection": _WiserSmokeAlarmCollection,
239
- "endpoint": WISERSMOKEALARM,
240
- },
241
- "WindowDoorSensor": {
242
- "class": _WiserWindowDoorSensor,
243
- "collection": _WiserBinarySensorCollection,
244
- "endpoint": WISERBINARYSENSOR,
245
- },
246
- "BoilerInterface": {
247
- "class": _WiserBoilerInterface,
248
- "collection": _WiserBoilerInterfaceCollection,
249
- "endpoint": WISERBOILERINTERFACE,
250
- },
251
- "CFMT": {
252
- "class": _WiserHeatingActuator,
253
- "collection": _WiserHeatingActuatorCollection,
254
- "endpoint": WISERHEATINGACTUATOR,
255
- "heating": True,
256
- "has_v2_equipment": True,
257
- },
258
- "ButtonPanel": {
259
- "class": _WiserButtonPanel,
260
- "collection": _WiserButtonPanelCollection,
261
- "endpoint": WISERBUTTONPANEL,
262
- },
263
- }
264
-
265
-
266
166
  class _WiserDeviceCollection:
267
167
  """Class holding all wiser devices"""
268
168
 
@@ -310,7 +210,23 @@ class _WiserDeviceCollection:
310
210
  device_type
311
211
  ].collection()
312
212
 
313
- if device_type_data := self._domain_data.get(device_type):
213
+ if device_type == "TempHumidity":
214
+ # This is a workaround for temp humidity device(s)
215
+ for device in self._domain_data.get("Device"):
216
+ if device.get("ProductType") == "TemperatureHumiditySensor":
217
+ device_config = PRODUCT_TYPE_CONFIG[device_type]
218
+ device_class = device_config.device_class
219
+ self._device_collection[device_type]._items.append(
220
+ device_class(
221
+ self._wiser_rest_controller,
222
+ device_config.endpoint,
223
+ device,
224
+ {},
225
+ None,
226
+ )
227
+ )
228
+
229
+ elif device_type_data := self._domain_data.get(device_type):
314
230
  # We have this device type in data
315
231
  device_config = PRODUCT_TYPE_CONFIG[device_type]
316
232
 
@@ -344,6 +260,10 @@ class _WiserDeviceCollection:
344
260
  else:
345
261
  device_schedule = None
346
262
 
263
+ # If has equipment data add to device info
264
+ if equipment_id := device.get("EquipmentId"):
265
+ device["EquipmentData"] = self._get_equipment_data(equipment_id)
266
+
347
267
  # Add device to collection
348
268
  self._device_collection[device_type]._items.append(
349
269
  device_class(
@@ -483,6 +403,14 @@ class _WiserDeviceCollection:
483
403
  except KeyError:
484
404
  return None
485
405
 
406
+ @property
407
+ def temp_humidity_sensors(self):
408
+ """Return all temp humidity sensors"""
409
+ try:
410
+ return self._device_collection["TempHumidity"]
411
+ except KeyError:
412
+ return None
413
+
486
414
  def get_by_id(self, device_id: int) -> _WiserDevice:
487
415
  """
488
416
  Gets a device object from the devices id
@@ -1,8 +1,4 @@
1
- from pathlib import Path, _ignore_error as pathlib_ignore_error
2
- from typing import Union
3
-
4
1
  import aiofiles.os as os
5
- import enum
6
2
 
7
3
 
8
4
  async def file_exists(file: str) -> bool:
@@ -140,15 +140,6 @@ class _WiserPowerTagControl(_WiserElectricalDevice):
140
140
  """Get energy export status"""
141
141
  return self._device_type_data.get("EnergyExport", TEXT_UNABLE)
142
142
 
143
- @property
144
- def equipment(self) -> _WiserEquipment | None:
145
- """Get equipment data"""
146
- return (
147
- _WiserEquipment(self._device_type_data.get("EquipmentData"))
148
- if self._device_type_data.get("EquipmentData")
149
- else None
150
- )
151
-
152
143
  @property
153
144
  def rfid(self) -> int:
154
145
  """Get rfid of device"""
@@ -0,0 +1,50 @@
1
+ from aioWiserHeatAPI.helpers.threshold import _WiserThresholdSensor
2
+
3
+ from .helpers.battery import _WiserBattery
4
+ from .helpers.device import _WiserDevice
5
+
6
+
7
+ class _WiserTempHumidity(_WiserDevice):
8
+ """Class representing a Temp Humidity device"""
9
+
10
+ def __init__(self, *args):
11
+ """Initialise."""
12
+ super().__init__(*args)
13
+ self._threshold_sensors: list[_WiserThresholdSensor] = []
14
+
15
+ @property
16
+ def battery(self) -> _WiserBattery:
17
+ """Get the battery information for the device"""
18
+ return _WiserBattery(self._data)
19
+
20
+ @property
21
+ def threshold_sensors(self) -> list[_WiserThresholdSensor]:
22
+ """Get threshold sensors."""
23
+ return self._threshold_sensors
24
+
25
+
26
+ class _WiserTempHumidityCollection:
27
+ """Class holding all wiser temp humidity sensors"""
28
+
29
+ def __init__(self):
30
+ self._items = []
31
+
32
+ @property
33
+ def all(self) -> list[_WiserTempHumidity]:
34
+ return list(self._items)
35
+
36
+ @property
37
+ def count(self) -> int:
38
+ return len(self.all)
39
+
40
+ # Roomstats
41
+ def get_by_id(self, temphum_id: int) -> _WiserTempHumidity:
42
+ """
43
+ Gets a temp humidity object from the device id
44
+ param id: id of device
45
+ return: _WiserTempHumidity object
46
+ """
47
+ for temphum in self.all:
48
+ if temphum.id == temphum_id:
49
+ return temphum
50
+ return None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aioWiserHeatAPI
3
- Version: 1.6.0
3
+ Version: 1.6.2
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.6.0
21
+ # Drayton Wiser Hub API Async v1.6.2
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,13 @@ Documentation available in [info.md](https://github.com/msp1974/wiserHeatAPIv2/b
72
72
 
73
73
  ## Changelog
74
74
 
75
+ ### v1.6.2
76
+ * Refactor: Removed unused imports causing error in python3.13
77
+ * Fix: Add equipment data during deviuce build process
78
+
79
+ ### v1.6.1
80
+ * Added: support for temperature and humidity sensors
81
+
75
82
  ### v1.6.0
76
83
  * Refactored how devices are enumerated
77
84
  * BREAKING CHANGE - threshold sensor is now a device attribute and not its own device
@@ -28,6 +28,7 @@ aioWiserHeatAPI/smartplug.py
28
28
  aioWiserHeatAPI/smartvalve.py
29
29
  aioWiserHeatAPI/smokealarm.py
30
30
  aioWiserHeatAPI/system.py
31
+ aioWiserHeatAPI/temp_humidity.py
31
32
  aioWiserHeatAPI/ufh.py
32
33
  aioWiserHeatAPI/wiserhub.py
33
34
  aioWiserHeatAPI.egg-info/PKG-INFO
File without changes