python-izone 1.3.12__py3-none-any.whl → 2.0.0__py3-none-any.whl
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.
- pizone/__init__.py +19 -8
- pizone/controller.py +133 -420
- pizone/discovery.py +499 -549
- pizone/exceptions.py +47 -0
- pizone/power.py +0 -3
- pizone/types.py +67 -1
- pizone/version.py +2 -2
- pizone/zone.py +17 -27
- {python_izone-1.3.12.dist-info → python_izone-2.0.0.dist-info}/METADATA +16 -3
- python_izone-2.0.0.dist-info/RECORD +15 -0
- {python_izone-1.3.12.dist-info → python_izone-2.0.0.dist-info}/WHEEL +1 -1
- python_izone-1.3.12.dist-info/RECORD +0 -15
- {python_izone-1.3.12.dist-info → python_izone-2.0.0.dist-info}/licenses/licence.txt +0 -0
pizone/__init__.py
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"""Interface to the iZone air conditioner controller.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
:
|
|
5
|
-
or discover :class:`~pizone.controller.Controller` instances through that
|
|
3
|
+
Use :func:`~pizone.discovery.create_discovery` to obtain a discovery service,
|
|
4
|
+
then create :class:`~pizone.controller.Controller` instances through that
|
|
6
5
|
service. Zones and power monitors are owned by their controller.
|
|
7
6
|
|
|
8
7
|
Synchronous property reads return cached device data and do not raise
|
|
9
8
|
:exc:`ConnectionError`. Async command and refresh methods perform HTTP I/O and
|
|
10
9
|
raise :exc:`ConnectionError` when the device cannot be reached. They raise
|
|
11
10
|
:exc:`~pizone.exceptions.ControllerCommandError` when the device responds but
|
|
12
|
-
rejects the request (``{ERROR...}`` body or HTTP 4xx).
|
|
11
|
+
rejects the request (``{ERROR...}`` body or HTTP 4xx). Setters raise
|
|
12
|
+
:exc:`~pizone.exceptions.InvalidValueError` before any I/O when a value is out
|
|
13
|
+
of range, off its step, or not supported by the system or zone.
|
|
13
14
|
|
|
14
15
|
Layered connection state on :class:`~pizone.controller.Controller`:
|
|
15
16
|
|
|
@@ -30,15 +31,22 @@ from typing import Any
|
|
|
30
31
|
|
|
31
32
|
from . import power as power_mod
|
|
32
33
|
from .controller import Controller
|
|
33
|
-
from .discovery import DiscoveryService,
|
|
34
|
+
from .discovery import DiscoveryService, create_discovery
|
|
34
35
|
from .exceptions import (
|
|
35
36
|
ControllerAlreadyClaimedError,
|
|
36
37
|
ControllerCommandError,
|
|
38
|
+
EndpointVerifyError,
|
|
39
|
+
InvalidValueError,
|
|
37
40
|
ResponseDecodeError,
|
|
38
41
|
UnpairedBridgeError,
|
|
39
42
|
)
|
|
40
43
|
from .power import BatteryLevel, Power, PowerChannel, PowerDevice, PowerGroup
|
|
41
|
-
from .types import
|
|
44
|
+
from .types import (
|
|
45
|
+
ControllerEndpoint,
|
|
46
|
+
DiscoveredEndpoints,
|
|
47
|
+
UnverifiedEndpoint,
|
|
48
|
+
VerifyFailure,
|
|
49
|
+
)
|
|
42
50
|
from .zone import Zone
|
|
43
51
|
|
|
44
52
|
|
|
@@ -69,15 +77,18 @@ __all__ = [
|
|
|
69
77
|
"ControllerAlreadyClaimedError",
|
|
70
78
|
"ControllerCommandError",
|
|
71
79
|
"ControllerEndpoint",
|
|
80
|
+
"DiscoveredEndpoints",
|
|
72
81
|
"DiscoveryService",
|
|
73
|
-
"
|
|
82
|
+
"EndpointVerifyError",
|
|
83
|
+
"InvalidValueError",
|
|
74
84
|
"Power",
|
|
75
85
|
"PowerChannel",
|
|
76
86
|
"PowerDevice",
|
|
77
87
|
"PowerGroup",
|
|
78
88
|
"ResponseDecodeError",
|
|
79
89
|
"UnpairedBridgeError",
|
|
90
|
+
"UnverifiedEndpoint",
|
|
91
|
+
"VerifyFailure",
|
|
80
92
|
"Zone",
|
|
81
93
|
"create_discovery",
|
|
82
|
-
"discovery",
|
|
83
94
|
]
|