aioWiserHeatAPI 1.5.13__tar.gz → 1.5.14__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 (52) hide show
  1. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/PKG-INFO +8 -2
  2. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/README.md +7 -1
  3. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/__init__.py +1 -1
  4. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/heating_actuator.py +4 -3
  5. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/pte.py +1 -1
  6. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/rest_controller.py +6 -2
  7. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/room.py +4 -10
  8. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/smartplug.py +2 -2
  9. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/wiserhub.py +2 -0
  10. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI.egg-info/PKG-INFO +8 -2
  11. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/LICENSE +0 -0
  12. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/cli.py +0 -0
  13. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/const.py +0 -0
  14. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/devices.py +0 -0
  15. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/discovery.py +0 -0
  16. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/exceptions.py +0 -0
  17. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/heating.py +0 -0
  18. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/helpers/__init__.py +0 -0
  19. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/helpers/automations.py +0 -0
  20. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/helpers/battery.py +0 -0
  21. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/helpers/capabilities.py +0 -0
  22. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/helpers/cloud.py +0 -0
  23. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/helpers/device.py +0 -0
  24. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/helpers/equipment.py +0 -0
  25. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/helpers/extra_config.py +0 -0
  26. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/helpers/firmware.py +0 -0
  27. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/helpers/gps.py +0 -0
  28. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/helpers/misc.py +0 -0
  29. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/helpers/network.py +0 -0
  30. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/helpers/opentherm.py +0 -0
  31. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/helpers/signal.py +0 -0
  32. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/helpers/special_times.py +0 -0
  33. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/helpers/status.py +0 -0
  34. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/helpers/temp.py +0 -0
  35. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/helpers/zigbee.py +0 -0
  36. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/hot_water.py +0 -0
  37. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/light.py +0 -0
  38. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/moments.py +0 -0
  39. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/roomstat.py +0 -0
  40. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/schedule.py +0 -0
  41. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/shutter.py +0 -0
  42. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/smartvalve.py +0 -0
  43. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/smokealarm.py +0 -0
  44. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/system.py +0 -0
  45. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI/ufh.py +0 -0
  46. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI.egg-info/SOURCES.txt +0 -0
  47. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI.egg-info/dependency_links.txt +0 -0
  48. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI.egg-info/entry_points.txt +0 -0
  49. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI.egg-info/requires.txt +0 -0
  50. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/aioWiserHeatAPI.egg-info/top_level.txt +0 -0
  51. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/setup.cfg +0 -0
  52. {aioWiserHeatAPI-1.5.13 → aiowiserheatapi-1.5.14}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aioWiserHeatAPI
3
- Version: 1.5.13
3
+ Version: 1.5.14
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.13
21
+ # Drayton Wiser Hub API Async v1.5.14
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,12 @@ Documentation available in [info.md](https://github.com/msp1974/wiserHeatAPIv2/b
72
72
 
73
73
  ## Changelog
74
74
 
75
+ ### v1.5.14
76
+
77
+ * Fix presets not using defined boost temp
78
+ * Set return value of energy sensors to None if not provided by hub
79
+ * Updated headers for hub query
80
+
75
81
  ### v1.5.13
76
82
 
77
83
  * Updates to support v2 hub functions - @LGO44
@@ -1,4 +1,4 @@
1
- # Drayton Wiser Hub API Async v1.5.13
1
+ # Drayton Wiser Hub API Async v1.5.14
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,12 @@ Documentation available in [info.md](https://github.com/msp1974/wiserHeatAPIv2/b
52
52
 
53
53
  ## Changelog
54
54
 
55
+ ### v1.5.14
56
+
57
+ * Fix presets not using defined boost temp
58
+ * Set return value of energy sensors to None if not provided by hub
59
+ * Updated headers for hub query
60
+
55
61
  ### v1.5.13
56
62
 
57
63
  * Updates to support v2 hub functions - @LGO44
@@ -3,6 +3,6 @@ import logging
3
3
  name = "aioWiserHeatAPI"
4
4
  __all__ = ["wiserAPI", "wiserDiscovery"]
5
5
 
6
- __VERSION__ = "1.5.13"
6
+ __VERSION__ = "1.5.14"
7
7
 
8
8
  _LOGGER = logging.getLogger(__name__)
@@ -4,9 +4,9 @@ from .const import (
4
4
  WISERHEATINGACTUATOR,
5
5
  WiserTempLimitsEnum,
6
6
  )
7
+ from .helpers.capabilities import _WiserClimateCapabilities
7
8
  from .helpers.device import _WiserDevice
8
9
  from .helpers.equipment import _WiserEquipment
9
- from .helpers.capabilities import _WiserClimateCapabilities
10
10
  from .helpers.temp import _WiserTemperatureFunctions as tf
11
11
  from .rest_controller import _WiserRestController
12
12
 
@@ -137,7 +137,7 @@ class _WiserHeatingActuator(_WiserDevice):
137
137
  @property
138
138
  def delivered_power(self) -> int:
139
139
  """Get the amount of power delivered over time"""
140
- return self._device_type_data.get("CurrentSummationDelivered", 0)
140
+ return self._device_type_data.get("CurrentSummationDelivered", None)
141
141
 
142
142
  @property
143
143
  def equipment_id(self) -> int:
@@ -166,13 +166,14 @@ class _WiserHeatingActuator(_WiserDevice):
166
166
  @property
167
167
  def instantaneous_power(self) -> int:
168
168
  """Get the amount of current passing through the device now"""
169
- return self._device_type_data.get("InstantaneousDemand", 0)
169
+ return self._device_type_data.get("InstantaneousDemand", None)
170
170
 
171
171
  @property
172
172
  def output_type(self) -> str:
173
173
  """Get output type"""
174
174
  return self._device_type_data.get("OutputType", TEXT_UNKNOWN)
175
175
 
176
+
176
177
  class _WiserHeatingActuatorCollection(object):
177
178
  """Class holding all wiser heating actuators"""
178
179
 
@@ -47,7 +47,7 @@ class _WiserPowerTagEnergy(_WiserDevice):
47
47
  @property
48
48
  def raw_total_active_power(self) -> int:
49
49
  """Get raw total active power of device"""
50
- return self._device_type_data.get("RawTotalActivePower", 0)
50
+ return self._device_type_data.get("RawTotalActivePower", None)
51
51
 
52
52
  @property
53
53
  def received_power(self) -> int:
@@ -12,6 +12,7 @@ import aiohttp
12
12
 
13
13
  from . import _LOGGER
14
14
  from .const import (
15
+ DEFAULT_BOOST_DELTA,
15
16
  REST_RETRY_BACKOFF,
16
17
  REST_TIMEOUT,
17
18
  WISERHUBDOMAIN,
@@ -34,6 +35,7 @@ class WiserAPIParams:
34
35
 
35
36
  passive_mode_increment = 0.5
36
37
  stored_manual_target_temperature_alt_source = "current"
38
+ boost_temp_delta = DEFAULT_BOOST_DELTA
37
39
 
38
40
 
39
41
  # Connection info class
@@ -88,7 +90,7 @@ class _WiserRestController(object):
88
90
  raise_for_endpoint_error: bool = True,
89
91
  ):
90
92
  """Function to retry on response errors due to inconsistant isues reading from the hub."""
91
- http_version = aiohttp.HttpVersion10
93
+ http_version = aiohttp.HttpVersion11
92
94
  self._last_exception = None
93
95
 
94
96
  for i in range(0, 5):
@@ -163,6 +165,9 @@ class _WiserRestController(object):
163
165
  kwargs = {}
164
166
  kwargs["headers"] = {
165
167
  "SECRET": self._wiser_connection_info.secret,
168
+ "Accept-Encoding": "gzip, deflate, br",
169
+ "Accept": "*/*",
170
+ "User-Agent": "HomeAssistant",
166
171
  }
167
172
 
168
173
  # if data is not None:
@@ -183,7 +188,6 @@ class _WiserRestController(object):
183
188
  async with session.request(
184
189
  action.value, url, **kwargs
185
190
  ) as response:
186
- # await asyncio.sleep(1)
187
191
  if not response.ok:
188
192
  self._process_nok_response(
189
193
  response, url, data, raise_for_endpoint_error
@@ -68,9 +68,6 @@ class _WiserRoom(object):
68
68
  "max": 18,
69
69
  }
70
70
 
71
- self._boost_temperature_delta = DEFAULT_BOOST_DELTA
72
- # self.stored_manual_target_temperature_alt_source = "current"
73
-
74
71
  # Add device id to schedule
75
72
  if self._schedule:
76
73
  self.schedule._assignments.append(
@@ -237,10 +234,7 @@ class _WiserRoom(object):
237
234
 
238
235
  @property
239
236
  def boost_temperature_delta(self) -> float:
240
- return self._boost_temperature_delta
241
-
242
- def set_boost_temperature_delta(self, temperature_delta: float):
243
- self._boost_temperature_delta = temperature_delta
237
+ return self._wiser_rest_controller._api_parameters.boost_temp_delta
244
238
 
245
239
  @property
246
240
  def capabilities(self) -> _WiserClimateCapabilities:
@@ -456,7 +450,7 @@ class _WiserRoom(object):
456
450
 
457
451
  async def set_preset(self, preset: WiserPresetOptionsEnum | str):
458
452
  """Set the preset mode"""
459
- if type(preset) == WiserPresetOptionsEnum:
453
+ if isinstance(preset, WiserPresetOptionsEnum):
460
454
  preset = preset.value
461
455
 
462
456
  # Is it valid preset option?
@@ -469,9 +463,9 @@ class _WiserRoom(object):
469
463
  # Lookup boost duration
470
464
  duration = WISER_BOOST_DURATION[preset]
471
465
  _LOGGER.debug(
472
- f"Boosting by {self._boost_temperature_delta}C for {duration} mins"
466
+ f"Boosting by {self.boost_temperature_delta}C for {duration} mins"
473
467
  )
474
- await self.boost(self._boost_temperature_delta, duration)
468
+ await self.boost(self.boost_temperature_delta, duration)
475
469
  else:
476
470
  raise ValueError(
477
471
  f"{preset} is not a valid preset. Valid presets are {self.available_presets}"
@@ -17,7 +17,7 @@ class _WiserSmartPlug(_WiserElectricalDevice):
17
17
  @property
18
18
  def delivered_power(self) -> int:
19
19
  """Get the amount of current throught the plug over time"""
20
- return self._device_type_data.get("CurrentSummationDelivered", -1)
20
+ return self._device_type_data.get("CurrentSummationDelivered", None)
21
21
 
22
22
  @property
23
23
  def equipment_id(self) -> int:
@@ -36,7 +36,7 @@ class _WiserSmartPlug(_WiserElectricalDevice):
36
36
  @property
37
37
  def instantaneous_power(self) -> int:
38
38
  """Get the amount of current throught the plug now"""
39
- return self._device_type_data.get("InstantaneousDemand", -1)
39
+ return self._device_type_data.get("InstantaneousDemand", None)
40
40
 
41
41
  @property
42
42
  def manual_state(self) -> str:
@@ -166,6 +166,7 @@ class WiserAPI:
166
166
  WiserHubConnectionError,
167
167
  WiserHubAuthenticationError,
168
168
  WiserHubRESTError,
169
+ Exception,
169
170
  ) as ex:
170
171
  _LOGGER.debug("Update from Wiser hub failed. %s", ex)
171
172
  raise ex
@@ -266,6 +267,7 @@ class WiserAPI:
266
267
  WiserHubConnectionError,
267
268
  WiserHubAuthenticationError,
268
269
  WiserHubRESTError,
270
+ Exception,
269
271
  ) as ex:
270
272
  raise ex
271
273
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aioWiserHeatAPI
3
- Version: 1.5.13
3
+ Version: 1.5.14
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.13
21
+ # Drayton Wiser Hub API Async v1.5.14
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,12 @@ Documentation available in [info.md](https://github.com/msp1974/wiserHeatAPIv2/b
72
72
 
73
73
  ## Changelog
74
74
 
75
+ ### v1.5.14
76
+
77
+ * Fix presets not using defined boost temp
78
+ * Set return value of energy sensors to None if not provided by hub
79
+ * Updated headers for hub query
80
+
75
81
  ### v1.5.13
76
82
 
77
83
  * Updates to support v2 hub functions - @LGO44