python-izone 1.3.9__py3-none-any.whl → 1.3.10__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/controller.py +47 -2
- pizone/discovery.py +2 -4
- pizone/version.py +2 -2
- {python_izone-1.3.9.dist-info → python_izone-1.3.10.dist-info}/METADATA +3 -3
- python_izone-1.3.10.dist-info/RECORD +14 -0
- {python_izone-1.3.9.dist-info → python_izone-1.3.10.dist-info}/WHEEL +1 -1
- python_izone-1.3.9.dist-info/RECORD +0 -14
- {python_izone-1.3.9.dist-info → python_izone-1.3.10.dist-info}/licenses/licence.txt +0 -0
pizone/controller.py
CHANGED
|
@@ -659,9 +659,11 @@ class Controller:
|
|
|
659
659
|
|
|
660
660
|
@property
|
|
661
661
|
def zone_ctrl(self) -> int:
|
|
662
|
-
"""Zone that currently controls the AC unit.
|
|
662
|
+
"""Zone index that currently controls the AC unit.
|
|
663
663
|
|
|
664
664
|
Value is interpreted in combination with :attr:`ras_mode`.
|
|
665
|
+
See :attr:`control_setpoint_owner` for the controller or zone that
|
|
666
|
+
owns the unit target.
|
|
665
667
|
|
|
666
668
|
Raises:
|
|
667
669
|
TypeError: If the cached value is missing or not numeric.
|
|
@@ -669,6 +671,50 @@ class Controller:
|
|
|
669
671
|
"""
|
|
670
672
|
return int(self._get_system_state("CtrlZone"))
|
|
671
673
|
|
|
674
|
+
@property
|
|
675
|
+
def control_setpoint_owner(self) -> Self | Zone | None:
|
|
676
|
+
"""Controller or zone that currently owns the unit setpoint.
|
|
677
|
+
|
|
678
|
+
Returns this controller when RAS mode is ``RAS``, when RAS mode is
|
|
679
|
+
``master`` and :attr:`zone_ctrl` is past :attr:`zones_total` (the
|
|
680
|
+
indoor unit itself), or when any AUTO zone has no room sensor.
|
|
681
|
+
Otherwise the zone matching :attr:`zone_ctrl`, or ``None`` if that
|
|
682
|
+
index does not match a zone.
|
|
683
|
+
|
|
684
|
+
CONST/OPCL zones never have a room sensor; only a missing AUTO CTS
|
|
685
|
+
forces unit control.
|
|
686
|
+
"""
|
|
687
|
+
if (
|
|
688
|
+
self.ras_mode == "RAS"
|
|
689
|
+
or (self.ras_mode == "master" and self.zone_ctrl > self.zones_total)
|
|
690
|
+
or any(
|
|
691
|
+
zone.type is Zone.Type.AUTO and zone.temp_current is None
|
|
692
|
+
for zone in self.zones
|
|
693
|
+
)
|
|
694
|
+
):
|
|
695
|
+
return self
|
|
696
|
+
return next(
|
|
697
|
+
(zone for zone in self.zones if zone.index == self.zone_ctrl),
|
|
698
|
+
None,
|
|
699
|
+
)
|
|
700
|
+
|
|
701
|
+
@property
|
|
702
|
+
def control_setpoint(self) -> float | None:
|
|
703
|
+
"""Setpoint of whoever currently owns the unit target.
|
|
704
|
+
|
|
705
|
+
:attr:`temp_setpoint` when the controller owns the unit target,
|
|
706
|
+
otherwise the controlling AUTO zone's setpoint. ``None`` when there
|
|
707
|
+
is no matching zone or that zone is not AUTO.
|
|
708
|
+
"""
|
|
709
|
+
owner = self.control_setpoint_owner
|
|
710
|
+
if owner is None:
|
|
711
|
+
return None
|
|
712
|
+
if not isinstance(owner, Zone):
|
|
713
|
+
return self.temp_setpoint
|
|
714
|
+
if owner.type is not Zone.Type.AUTO:
|
|
715
|
+
return None
|
|
716
|
+
return owner.temp_setpoint
|
|
717
|
+
|
|
672
718
|
@property
|
|
673
719
|
def zones_total(self) -> int:
|
|
674
720
|
"""Number of zones the system is configured for.
|
|
@@ -1024,7 +1070,6 @@ class Controller:
|
|
|
1024
1070
|
lock,
|
|
1025
1071
|
session.get(
|
|
1026
1072
|
f"http://{self.device_ip}/{resource}",
|
|
1027
|
-
headers={"Connection": "close"},
|
|
1028
1073
|
timeout=aiohttp.ClientTimeout(total=Controller.REQUEST_TIMEOUT),
|
|
1029
1074
|
) as response,
|
|
1030
1075
|
):
|
pizone/discovery.py
CHANGED
|
@@ -22,7 +22,7 @@ from types import TracebackType
|
|
|
22
22
|
from typing import Any, Self, cast
|
|
23
23
|
|
|
24
24
|
import aiohttp
|
|
25
|
-
from aiohttp import ClientSession
|
|
25
|
+
from aiohttp import ClientSession
|
|
26
26
|
import ifaddr
|
|
27
27
|
|
|
28
28
|
from .const import PLACEHOLDER_DEVICE_UID
|
|
@@ -301,8 +301,7 @@ class DiscoveryService:
|
|
|
301
301
|
|
|
302
302
|
"""
|
|
303
303
|
if self._own_session:
|
|
304
|
-
|
|
305
|
-
self._session = ClientSession(connector=TCPConnector(force_close=True))
|
|
304
|
+
self._session = ClientSession()
|
|
306
305
|
|
|
307
306
|
_svc = self
|
|
308
307
|
|
|
@@ -680,7 +679,6 @@ class DiscoveryService:
|
|
|
680
679
|
try:
|
|
681
680
|
async with session.get(
|
|
682
681
|
f"http://{host}/SystemSettings",
|
|
683
|
-
headers={"Connection": "close"},
|
|
684
682
|
timeout=aiohttp.ClientTimeout(total=Controller.REQUEST_TIMEOUT),
|
|
685
683
|
) as response:
|
|
686
684
|
if response.status >= 400:
|
pizone/version.py
CHANGED
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '1.3.
|
|
22
|
-
__version_tuple__ = version_tuple = (1, 3,
|
|
21
|
+
__version__ = version = '1.3.10'
|
|
22
|
+
__version_tuple__ = version_tuple = (1, 3, 10)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: python-izone
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.10
|
|
4
4
|
Summary: A python interface to the iZone airconditioner controller
|
|
5
5
|
Project-URL: Homepage, https://github.com/Swamp-Ig/pizone
|
|
6
6
|
Author-email: Penny Wood <pypl@ninjateaparty.com>
|
|
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 3.14
|
|
|
15
15
|
Classifier: Topic :: Home Automation
|
|
16
16
|
Classifier: Topic :: System :: Hardware
|
|
17
17
|
Requires-Python: >=3.14
|
|
18
|
-
Requires-Dist: aiohttp>=3.14.
|
|
18
|
+
Requires-Dist: aiohttp>=3.14.3
|
|
19
19
|
Requires-Dist: ifaddr>=0.2.0
|
|
20
20
|
Provides-Extra: test
|
|
21
21
|
Requires-Dist: pytest-aio; extra == 'test'
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
pizone/__init__.py,sha256=9EbQzqD1XfS5fSE-zgFieuzxAfZcQb9a3wNXsMp0JKc,2644
|
|
2
|
+
pizone/const.py,sha256=0skTh6zBe61AJ_57fqdBrxz3aVBM3T4Ak_cPSkOx2Bo,153
|
|
3
|
+
pizone/controller.py,sha256=XyTuqTUY_7_yj09Gh27jU24wPY9Sq5ocOoV4ArNVt4w,43929
|
|
4
|
+
pizone/discovery.py,sha256=7U9kedKH7ReUJ76z9u_CCswJYn7_8UedDe6j1R-waxA,40019
|
|
5
|
+
pizone/exceptions.py,sha256=qzYNHzQBMDcuvLfxlvOsk6J2Lp0gtzlHqJWpzyEunvU,1603
|
|
6
|
+
pizone/power.py,sha256=ZWj_RLxvcQT3WxdAyUHzPAl7DtQGtT4FPIIdGVxatO0,10576
|
|
7
|
+
pizone/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
+
pizone/types.py,sha256=fZrnec0Q815HyG2sFciLqNX0QDbTq1_0wTF92GXQh78,200
|
|
9
|
+
pizone/version.py,sha256=wDY5DngRcW_8_eFT1pr8FgSMVpa__ZugYTY67NsqxRs,522
|
|
10
|
+
pizone/zone.py,sha256=LoiUFHcHLAmsVEkS1YcA6lKAOzu7A6RGnV_5mC1vV-I,7601
|
|
11
|
+
python_izone-1.3.10.dist-info/METADATA,sha256=l3yjivO1LCWPTt8yPOlsqFNGxLA5lv5PSc8A9qY72kE,3522
|
|
12
|
+
python_izone-1.3.10.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
|
|
13
|
+
python_izone-1.3.10.dist-info/licenses/licence.txt,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
14
|
+
python_izone-1.3.10.dist-info/RECORD,,
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
pizone/__init__.py,sha256=9EbQzqD1XfS5fSE-zgFieuzxAfZcQb9a3wNXsMp0JKc,2644
|
|
2
|
-
pizone/const.py,sha256=0skTh6zBe61AJ_57fqdBrxz3aVBM3T4Ak_cPSkOx2Bo,153
|
|
3
|
-
pizone/controller.py,sha256=l0qLAhSEF71kMLc9pG7EuQ3jaAfo0kdSBr0QgbJvfKo,42225
|
|
4
|
-
pizone/discovery.py,sha256=aiXZ6c57Z66usjwFMcQZ9ioNkw3_S2i1KQTpIEjquEQ,40199
|
|
5
|
-
pizone/exceptions.py,sha256=qzYNHzQBMDcuvLfxlvOsk6J2Lp0gtzlHqJWpzyEunvU,1603
|
|
6
|
-
pizone/power.py,sha256=ZWj_RLxvcQT3WxdAyUHzPAl7DtQGtT4FPIIdGVxatO0,10576
|
|
7
|
-
pizone/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
-
pizone/types.py,sha256=fZrnec0Q815HyG2sFciLqNX0QDbTq1_0wTF92GXQh78,200
|
|
9
|
-
pizone/version.py,sha256=g62BHujLgGdP6cB1oucUZ89PYnKUKXkd5IR17viSOVM,520
|
|
10
|
-
pizone/zone.py,sha256=LoiUFHcHLAmsVEkS1YcA6lKAOzu7A6RGnV_5mC1vV-I,7601
|
|
11
|
-
python_izone-1.3.9.dist-info/METADATA,sha256=3uBQnmINRhPCzENIcDiNGjTPoCfycDO7gUZhb_cy2yM,3521
|
|
12
|
-
python_izone-1.3.9.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
|
|
13
|
-
python_izone-1.3.9.dist-info/licenses/licence.txt,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
14
|
-
python_izone-1.3.9.dist-info/RECORD,,
|
|
File without changes
|