aioWiserHeatAPI 1.7.4__tar.gz → 1.7.6__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 (64) hide show
  1. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/PKG-INFO +12 -3
  2. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/README.md +11 -2
  3. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/__init__.py +1 -1
  4. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/helpers/misc.py +4 -2
  5. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/schedule.py +5 -1
  6. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI.egg-info/PKG-INFO +12 -3
  7. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI.egg-info/SOURCES.txt +2 -1
  8. aiowiserheatapi-1.7.6/tests/test_schedule.py +32 -0
  9. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/LICENSE +0 -0
  10. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/automation.py +0 -0
  11. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/binary_sensor.py +0 -0
  12. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/boiler_interface.py +0 -0
  13. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/button_panel.py +0 -0
  14. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/cli.py +0 -0
  15. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/const.py +0 -0
  16. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/devices.py +0 -0
  17. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/discovery.py +0 -0
  18. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/evse.py +0 -0
  19. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/exceptions.py +0 -0
  20. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/heating.py +0 -0
  21. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/heating_actuator.py +0 -0
  22. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/helpers/__init__.py +0 -0
  23. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/helpers/automations.py +0 -0
  24. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/helpers/battery.py +0 -0
  25. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/helpers/capabilities.py +0 -0
  26. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/helpers/cloud.py +0 -0
  27. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/helpers/device.py +0 -0
  28. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/helpers/equipment.py +0 -0
  29. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/helpers/extra_config.py +0 -0
  30. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/helpers/firmware.py +0 -0
  31. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/helpers/gps.py +0 -0
  32. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/helpers/network.py +0 -0
  33. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/helpers/opentherm.py +0 -0
  34. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/helpers/signal.py +0 -0
  35. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/helpers/special_times.py +0 -0
  36. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/helpers/status.py +0 -0
  37. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/helpers/temp.py +0 -0
  38. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/helpers/threshold.py +0 -0
  39. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/helpers/uiconfiguration.py +0 -0
  40. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/helpers/version.py +0 -0
  41. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/helpers/zigbee.py +0 -0
  42. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/hot_water.py +0 -0
  43. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/light.py +0 -0
  44. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/moments.py +0 -0
  45. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/ptc.py +0 -0
  46. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/pte.py +0 -0
  47. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/refactor.py +0 -0
  48. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/rest_controller.py +0 -0
  49. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/room.py +0 -0
  50. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/roomstat.py +0 -0
  51. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/shutter.py +0 -0
  52. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/smartplug.py +0 -0
  53. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/smartvalve.py +0 -0
  54. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/smokealarm.py +0 -0
  55. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/system.py +0 -0
  56. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/temp_humidity.py +0 -0
  57. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/ufh.py +0 -0
  58. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI/wiserhub.py +0 -0
  59. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI.egg-info/dependency_links.txt +0 -0
  60. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI.egg-info/entry_points.txt +0 -0
  61. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI.egg-info/requires.txt +0 -0
  62. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/aioWiserHeatAPI.egg-info/top_level.txt +0 -0
  63. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/setup.cfg +0 -0
  64. {aiowiserheatapi-1.7.4 → aiowiserheatapi-1.7.6}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aioWiserHeatAPI
3
- Version: 1.7.4
3
+ Version: 1.7.6
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
@@ -28,7 +28,7 @@ Dynamic: requires-dist
28
28
  Dynamic: requires-python
29
29
  Dynamic: summary
30
30
 
31
- # Drayton Wiser Hub API Async v1.7.4
31
+ # Drayton Wiser Hub API Async v1.7.6
32
32
 
33
33
  This repository contains a simple API which queries the Drayton Wiser Heating sysystem used in the UK.
34
34
 
@@ -47,13 +47,17 @@ Reference [https://it.knightnet.org.uk/kb/nr-qa/drayton-wiser-heating-control/#c
47
47
 
48
48
  1. Press the setup button on your HeatHub, the light will start flashing
49
49
  Look for the Wi-Fi network (SSID) called **‘WiserHeatXXXXXX’** where XXXXXX is last 6 digits of the MAC address
50
+
50
51
  2. Connect to the network from a Windows/Linux/Mac/Android/iPhone machine
52
+
51
53
  3. Execute the secret url :-)
54
+
52
55
  - Open a browser to url `http://192.168.8.1/secret`
53
56
 
54
57
  This will return a string which is your system secret, store this somewhere. If you are running the test script simply put this value , with the ip address of the hub, in your wiserkeys.params
55
58
 
56
59
  4. Press the setup button on the HeatHub again and it will go back to normal operations
60
+
57
61
  5. Copy the secret and save it somewhere.
58
62
 
59
63
  ## 3. Find Your HEATHUB IP
@@ -82,7 +86,12 @@ Documentation available in [info.md](https://github.com/msp1974/wiserHeatAPIv2/b
82
86
 
83
87
  ## Changelog
84
88
 
85
- ### v1.7.4
89
+ ### v1.7.6
90
+
91
+ - Fix: Avoid eager `aiofiles.os` imports during startup to prevent mixed-version import failures in Home Assistant (issue #763)
92
+ - Fix: Handle advancing a heating schedule when the next period is off (issue #657)
93
+
94
+ ### v1.7.5
86
95
 
87
96
  - Added: optional scheduled lower-temperature provider for Passive Mode
88
97
  - Added: EVSE device support
@@ -1,4 +1,4 @@
1
- # Drayton Wiser Hub API Async v1.7.4
1
+ # Drayton Wiser Hub API Async v1.7.6
2
2
 
3
3
  This repository contains a simple API which queries the Drayton Wiser Heating sysystem used in the UK.
4
4
 
@@ -17,13 +17,17 @@ Reference [https://it.knightnet.org.uk/kb/nr-qa/drayton-wiser-heating-control/#c
17
17
 
18
18
  1. Press the setup button on your HeatHub, the light will start flashing
19
19
  Look for the Wi-Fi network (SSID) called **‘WiserHeatXXXXXX’** where XXXXXX is last 6 digits of the MAC address
20
+
20
21
  2. Connect to the network from a Windows/Linux/Mac/Android/iPhone machine
22
+
21
23
  3. Execute the secret url :-)
24
+
22
25
  - Open a browser to url `http://192.168.8.1/secret`
23
26
 
24
27
  This will return a string which is your system secret, store this somewhere. If you are running the test script simply put this value , with the ip address of the hub, in your wiserkeys.params
25
28
 
26
29
  4. Press the setup button on the HeatHub again and it will go back to normal operations
30
+
27
31
  5. Copy the secret and save it somewhere.
28
32
 
29
33
  ## 3. Find Your HEATHUB IP
@@ -52,7 +56,12 @@ Documentation available in [info.md](https://github.com/msp1974/wiserHeatAPIv2/b
52
56
 
53
57
  ## Changelog
54
58
 
55
- ### v1.7.4
59
+ ### v1.7.6
60
+
61
+ - Fix: Avoid eager `aiofiles.os` imports during startup to prevent mixed-version import failures in Home Assistant (issue #763)
62
+ - Fix: Handle advancing a heating schedule when the next period is off (issue #657)
63
+
64
+ ### v1.7.5
56
65
 
57
66
  - Added: optional scheduled lower-temperature provider for Passive Mode
58
67
  - Added: EVSE device support
@@ -3,6 +3,6 @@ import logging
3
3
  name = "aioWiserHeatAPI"
4
4
  __all__ = ["wiserAPI", "wiserDiscovery"]
5
5
 
6
- __VERSION__ = "1.7.4"
6
+ __VERSION__ = "1.7.6"
7
7
 
8
8
  _LOGGER = logging.getLogger(__name__)
@@ -1,8 +1,10 @@
1
- import aiofiles.os as os
1
+ import asyncio
2
+ from pathlib import Path
2
3
 
3
4
 
4
5
  async def file_exists(file: str) -> bool:
5
- return await os.path.isfile(file)
6
+ """Return whether a path is a file without blocking the event loop."""
7
+ return await asyncio.to_thread(Path(file).is_file)
6
8
 
7
9
 
8
10
  def is_value_in_list(value: str, item_list: list) -> bool:
@@ -90,7 +90,11 @@ class _WiserScheduleNext:
90
90
  def setting(self) -> float | str | None:
91
91
  """Get the next entry setting - temp for heating, state for on/off devices"""
92
92
  if self._schedule_type == TEXT_HEATING:
93
- return tf._from_wiser_temp(self._data.get("DegreesC", TEMP_MINIMUM))
93
+ temperature = self._data.get(TEXT_DEGREESC, TEMP_MINIMUM)
94
+ # The hub represents an off heating period with a null setpoint.
95
+ if temperature is None:
96
+ return TEMP_OFF
97
+ return tf._from_wiser_temp(temperature)
94
98
  if self._schedule_type == TEXT_ONOFF:
95
99
  return self._data.get("State")
96
100
  if self._schedule_type == TEXT_LEVEL:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aioWiserHeatAPI
3
- Version: 1.7.4
3
+ Version: 1.7.6
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
@@ -28,7 +28,7 @@ Dynamic: requires-dist
28
28
  Dynamic: requires-python
29
29
  Dynamic: summary
30
30
 
31
- # Drayton Wiser Hub API Async v1.7.4
31
+ # Drayton Wiser Hub API Async v1.7.6
32
32
 
33
33
  This repository contains a simple API which queries the Drayton Wiser Heating sysystem used in the UK.
34
34
 
@@ -47,13 +47,17 @@ Reference [https://it.knightnet.org.uk/kb/nr-qa/drayton-wiser-heating-control/#c
47
47
 
48
48
  1. Press the setup button on your HeatHub, the light will start flashing
49
49
  Look for the Wi-Fi network (SSID) called **‘WiserHeatXXXXXX’** where XXXXXX is last 6 digits of the MAC address
50
+
50
51
  2. Connect to the network from a Windows/Linux/Mac/Android/iPhone machine
52
+
51
53
  3. Execute the secret url :-)
54
+
52
55
  - Open a browser to url `http://192.168.8.1/secret`
53
56
 
54
57
  This will return a string which is your system secret, store this somewhere. If you are running the test script simply put this value , with the ip address of the hub, in your wiserkeys.params
55
58
 
56
59
  4. Press the setup button on the HeatHub again and it will go back to normal operations
60
+
57
61
  5. Copy the secret and save it somewhere.
58
62
 
59
63
  ## 3. Find Your HEATHUB IP
@@ -82,7 +86,12 @@ Documentation available in [info.md](https://github.com/msp1974/wiserHeatAPIv2/b
82
86
 
83
87
  ## Changelog
84
88
 
85
- ### v1.7.4
89
+ ### v1.7.6
90
+
91
+ - Fix: Avoid eager `aiofiles.os` imports during startup to prevent mixed-version import failures in Home Assistant (issue #763)
92
+ - Fix: Handle advancing a heating schedule when the next period is off (issue #657)
93
+
94
+ ### v1.7.5
86
95
 
87
96
  - Added: optional scheduled lower-temperature provider for Passive Mode
88
97
  - Added: EVSE device support
@@ -59,4 +59,5 @@ aioWiserHeatAPI/helpers/temp.py
59
59
  aioWiserHeatAPI/helpers/threshold.py
60
60
  aioWiserHeatAPI/helpers/uiconfiguration.py
61
61
  aioWiserHeatAPI/helpers/version.py
62
- aioWiserHeatAPI/helpers/zigbee.py
62
+ aioWiserHeatAPI/helpers/zigbee.py
63
+ tests/test_schedule.py
@@ -0,0 +1,32 @@
1
+ """Tests for Wiser schedule values."""
2
+
3
+ import unittest
4
+
5
+ from aioWiserHeatAPI.const import TEMP_OFF, TEXT_HEATING
6
+ from aioWiserHeatAPI.schedule import _WiserScheduleNext
7
+
8
+
9
+ class WiserScheduleNextTest(unittest.TestCase):
10
+ """Test conversion of the next scheduled setting."""
11
+
12
+ def test_heating_off_period_returns_off_temperature(self) -> None:
13
+ """A null heating setpoint represents an off schedule period."""
14
+ next_entry = _WiserScheduleNext(TEXT_HEATING, {"DegreesC": None})
15
+
16
+ self.assertEqual(next_entry.setting, TEMP_OFF)
17
+
18
+ def test_heating_period_returns_temperature(self) -> None:
19
+ """A normal heating setpoint is converted to degrees Celsius."""
20
+ next_entry = _WiserScheduleNext(TEXT_HEATING, {"DegreesC": 195})
21
+
22
+ self.assertEqual(next_entry.setting, 19.5)
23
+
24
+ def test_invalid_high_heating_period_remains_unavailable(self) -> None:
25
+ """An invalid high setpoint must not be mistaken for off."""
26
+ next_entry = _WiserScheduleNext(TEXT_HEATING, {"DegreesC": 2000})
27
+
28
+ self.assertIsNone(next_entry.setting)
29
+
30
+
31
+ if __name__ == "__main__":
32
+ unittest.main()
File without changes