python-izone 1.2.10__tar.gz → 1.3.1__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.
- python_izone-1.3.1/.github/workflows/main.yml +57 -0
- {python_izone-1.2.10 → python_izone-1.3.1}/.pylintrc +1 -1
- python_izone-1.3.1/.python-version +1 -0
- python_izone-1.3.1/PKG-INFO +79 -0
- python_izone-1.3.1/README.md +53 -0
- python_izone-1.3.1/pizone/__init__.py +31 -0
- python_izone-1.3.1/pizone/controller.py +677 -0
- {python_izone-1.2.10 → python_izone-1.3.1}/pizone/discovery.py +138 -97
- python_izone-1.3.1/pizone/exceptions.py +10 -0
- python_izone-1.3.1/pizone/power.py +282 -0
- python_izone-1.3.1/pizone/py.typed +0 -0
- {python_izone-1.2.10 → python_izone-1.3.1}/pizone/version.py +3 -3
- python_izone-1.3.1/pizone/zone.py +209 -0
- python_izone-1.3.1/pyproject.toml +103 -0
- python_izone-1.3.1/scripts/check +8 -0
- python_izone-1.3.1/scripts/coverage +9 -0
- python_izone-1.3.1/tests/conftest.py +184 -0
- python_izone-1.3.1/tests/http_fakes.py +78 -0
- python_izone-1.3.1/tests/power_data.py +67 -0
- {python_izone-1.2.10 → python_izone-1.3.1}/tests/resources.py +2 -0
- python_izone-1.3.1/tests/test_controller.py +116 -0
- python_izone-1.3.1/tests/test_discovery.py +606 -0
- {python_izone-1.2.10 → python_izone-1.3.1}/tests/test_fullstack.py +46 -31
- python_izone-1.3.1/tests/test_http.py +169 -0
- python_izone-1.3.1/tests/test_power.py +106 -0
- python_izone-1.3.1/tests/test_zone.py +140 -0
- python_izone-1.3.1/uv.lock +732 -0
- python_izone-1.2.10/.github/workflows/main.yml +0 -37
- python_izone-1.2.10/PKG-INFO +0 -40
- python_izone-1.2.10/README.md +0 -10
- python_izone-1.2.10/pizone/__init__.py +0 -22
- python_izone-1.2.10/pizone/controller.py +0 -571
- python_izone-1.2.10/pizone/power.py +0 -247
- python_izone-1.2.10/pizone/zone.py +0 -180
- python_izone-1.2.10/pyproject.toml +0 -12
- python_izone-1.2.10/pytest.ini +0 -5
- python_izone-1.2.10/python_izone.egg-info/PKG-INFO +0 -40
- python_izone-1.2.10/python_izone.egg-info/SOURCES.txt +0 -33
- python_izone-1.2.10/python_izone.egg-info/dependency_links.txt +0 -1
- python_izone-1.2.10/python_izone.egg-info/requires.txt +0 -12
- python_izone-1.2.10/python_izone.egg-info/top_level.txt +0 -1
- python_izone-1.2.10/setup.cfg +0 -46
- python_izone-1.2.10/setup.py +0 -6
- python_izone-1.2.10/tests/conftest.py +0 -138
- python_izone-1.2.10/tests/test_discovery.py +0 -275
- {python_izone-1.2.10 → python_izone-1.3.1}/.gitattributes +0 -0
- {python_izone-1.2.10 → python_izone-1.3.1}/.gitignore +0 -0
- {python_izone-1.2.10 → python_izone-1.3.1}/.pre-commit-config.yaml +0 -0
- {python_izone-1.2.10 → python_izone-1.3.1}/.vscode/.ropeproject/config.py +0 -0
- {python_izone-1.2.10 → python_izone-1.3.1}/.vscode/launch.json +0 -0
- {python_izone-1.2.10 → python_izone-1.3.1}/.vscode/settings.json +0 -0
- {python_izone-1.2.10 → python_izone-1.3.1}/api_docs/AC-DOC-1401-11_iZoneEthernetInterface.pdf +0 -0
- {python_izone-1.2.10 → python_izone-1.3.1}/api_docs/iPower_JSON_datastrings_Out.h +0 -0
- {python_izone-1.2.10 → python_izone-1.3.1}/api_docs/iZone_JSON_datastrings.h +0 -0
- {python_izone-1.2.10 → python_izone-1.3.1}/licence.txt +0 -0
- {python_izone-1.2.10 → python_izone-1.3.1}/tests/__init__.py +0 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on: [push]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
build:
|
|
7
|
+
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
permissions:
|
|
10
|
+
id-token: write
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
python-version: ["3.14"]
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v7
|
|
17
|
+
with:
|
|
18
|
+
fetch-depth: 0
|
|
19
|
+
- name: Install uv
|
|
20
|
+
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
|
21
|
+
with:
|
|
22
|
+
python-version: ${{ matrix.python-version }}
|
|
23
|
+
cache-suffix: build
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: uv sync --frozen --all-extras --group dev
|
|
26
|
+
- name: Lint with Pylint
|
|
27
|
+
run: uv run pylint pizone
|
|
28
|
+
- name: Type check with mypy
|
|
29
|
+
run: uv run mypy pizone
|
|
30
|
+
- name: Test with pytest
|
|
31
|
+
run: uv run pytest tests/ -q
|
|
32
|
+
- name: Build package
|
|
33
|
+
run: uv build
|
|
34
|
+
- name: Publish package
|
|
35
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && matrix.python-version == '3.14'
|
|
36
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
37
|
+
|
|
38
|
+
coverage:
|
|
39
|
+
runs-on: ubuntu-latest
|
|
40
|
+
continue-on-error: true
|
|
41
|
+
steps:
|
|
42
|
+
- uses: actions/checkout@v7
|
|
43
|
+
- name: Install uv
|
|
44
|
+
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
|
45
|
+
with:
|
|
46
|
+
python-version: "3.14"
|
|
47
|
+
cache-suffix: coverage
|
|
48
|
+
- name: Install dependencies
|
|
49
|
+
run: uv sync --frozen --all-extras --group dev
|
|
50
|
+
- name: Test coverage (advisory)
|
|
51
|
+
run: uv run pytest tests/ -q --cov=pizone --cov-report=term-missing:skip-covered --cov-report=html
|
|
52
|
+
- name: Upload HTML coverage report
|
|
53
|
+
uses: actions/upload-artifact@v7
|
|
54
|
+
if: always()
|
|
55
|
+
with:
|
|
56
|
+
name: coverage-html
|
|
57
|
+
path: htmlcov/
|
|
@@ -21,7 +21,7 @@ analyse-fallback-blocks=no
|
|
|
21
21
|
# A comma-separated list of package or module names from where C extensions may
|
|
22
22
|
# be loaded. Extensions are loading into the active Python interpreter and may
|
|
23
23
|
# run arbitrary code.
|
|
24
|
-
extension-pkg-allow-list=
|
|
24
|
+
extension-pkg-allow-list=
|
|
25
25
|
|
|
26
26
|
# A comma-separated list of package or module names from where C extensions may
|
|
27
27
|
# be loaded. Extensions are loading into the active Python interpreter and may
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.14
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: python-izone
|
|
3
|
+
Version: 1.3.1
|
|
4
|
+
Summary: A python interface to the iZone airconditioner controller
|
|
5
|
+
Project-URL: Homepage, https://github.com/Swamp-Ig/pizone
|
|
6
|
+
Author-email: Penny Wood <pypl@ninjateaparty.com>
|
|
7
|
+
License-Expression: GPL-3.0-or-later
|
|
8
|
+
License-File: licence.txt
|
|
9
|
+
Keywords: IoT,iZone
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
|
+
Classifier: Topic :: Home Automation
|
|
16
|
+
Classifier: Topic :: System :: Hardware
|
|
17
|
+
Requires-Python: >=3.14
|
|
18
|
+
Requires-Dist: aiohttp>=3.14.1
|
|
19
|
+
Requires-Dist: ifaddr>=0.2.0
|
|
20
|
+
Provides-Extra: test
|
|
21
|
+
Requires-Dist: pytest-aio; extra == 'test'
|
|
22
|
+
Requires-Dist: pytest-aiohttp; extra == 'test'
|
|
23
|
+
Requires-Dist: pytest-cov; extra == 'test'
|
|
24
|
+
Requires-Dist: pytest>=6.2.2; extra == 'test'
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
|
|
27
|
+
# python-izone
|
|
28
|
+
|
|
29
|
+
Python library for the [iZone](https://izone.com.au/) air conditioning system.
|
|
30
|
+
|
|
31
|
+
Used by the [Home Assistant iZone integration](https://www.home-assistant.io/integrations/izone/).
|
|
32
|
+
|
|
33
|
+
## Install
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
pip install python-izone
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Overview
|
|
40
|
+
|
|
41
|
+
The main entry points are `Controller` and `Zone` for device control, and
|
|
42
|
+
`DiscoveryService` for UDP discovery on the local network.
|
|
43
|
+
|
|
44
|
+
Synchronous property reads return cached device data and do not raise
|
|
45
|
+
`ConnectionError`. Async command and refresh methods perform HTTP I/O and
|
|
46
|
+
raise `ConnectionError` when the device cannot be reached. They raise
|
|
47
|
+
`ControllerCommandError` when the device responds but rejects the request
|
|
48
|
+
(`{ERROR}` body or HTTP 4xx).
|
|
49
|
+
|
|
50
|
+
## Dependencies
|
|
51
|
+
|
|
52
|
+
Requires `aiohttp>=3.14.1`. Home Assistant pins `aiohttp==3.14.1`; that version
|
|
53
|
+
includes the HTTP POST coalescing fix ([aiohttp#10991](https://github.com/aio-libs/aiohttp/pull/10991))
|
|
54
|
+
needed for iZone controllers that read the request in a single operation.
|
|
55
|
+
|
|
56
|
+
## Protocol documentation
|
|
57
|
+
|
|
58
|
+
The iZone Ethernet interface is documented in
|
|
59
|
+
[AC-DOC-1401-11_iZoneEthernetInterface.pdf](./AC-DOC-1401-11_iZoneEthernetInterface.pdf).
|
|
60
|
+
|
|
61
|
+
## Development
|
|
62
|
+
|
|
63
|
+
1. Install [uv](https://docs.astral.sh/uv/).
|
|
64
|
+
2. `uv sync --all-extras --group dev`
|
|
65
|
+
3. `./scripts/check` — lint, type-check, test, and build (same as CI)
|
|
66
|
+
4. `./scripts/coverage` — test coverage report (advisory; not part of the CI gate)
|
|
67
|
+
|
|
68
|
+
Individual commands:
|
|
69
|
+
|
|
70
|
+
- `uv run pytest tests/`
|
|
71
|
+
- `uv run pylint pizone`
|
|
72
|
+
- `uv run mypy pizone`
|
|
73
|
+
- `uv build`
|
|
74
|
+
|
|
75
|
+
To run integration tests against a controller on your network:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
uv run pytest tests/test_fullstack.py -m hardware -o addopts=
|
|
79
|
+
```
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# python-izone
|
|
2
|
+
|
|
3
|
+
Python library for the [iZone](https://izone.com.au/) air conditioning system.
|
|
4
|
+
|
|
5
|
+
Used by the [Home Assistant iZone integration](https://www.home-assistant.io/integrations/izone/).
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install python-izone
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
The main entry points are `Controller` and `Zone` for device control, and
|
|
16
|
+
`DiscoveryService` for UDP discovery on the local network.
|
|
17
|
+
|
|
18
|
+
Synchronous property reads return cached device data and do not raise
|
|
19
|
+
`ConnectionError`. Async command and refresh methods perform HTTP I/O and
|
|
20
|
+
raise `ConnectionError` when the device cannot be reached. They raise
|
|
21
|
+
`ControllerCommandError` when the device responds but rejects the request
|
|
22
|
+
(`{ERROR}` body or HTTP 4xx).
|
|
23
|
+
|
|
24
|
+
## Dependencies
|
|
25
|
+
|
|
26
|
+
Requires `aiohttp>=3.14.1`. Home Assistant pins `aiohttp==3.14.1`; that version
|
|
27
|
+
includes the HTTP POST coalescing fix ([aiohttp#10991](https://github.com/aio-libs/aiohttp/pull/10991))
|
|
28
|
+
needed for iZone controllers that read the request in a single operation.
|
|
29
|
+
|
|
30
|
+
## Protocol documentation
|
|
31
|
+
|
|
32
|
+
The iZone Ethernet interface is documented in
|
|
33
|
+
[AC-DOC-1401-11_iZoneEthernetInterface.pdf](./AC-DOC-1401-11_iZoneEthernetInterface.pdf).
|
|
34
|
+
|
|
35
|
+
## Development
|
|
36
|
+
|
|
37
|
+
1. Install [uv](https://docs.astral.sh/uv/).
|
|
38
|
+
2. `uv sync --all-extras --group dev`
|
|
39
|
+
3. `./scripts/check` — lint, type-check, test, and build (same as CI)
|
|
40
|
+
4. `./scripts/coverage` — test coverage report (advisory; not part of the CI gate)
|
|
41
|
+
|
|
42
|
+
Individual commands:
|
|
43
|
+
|
|
44
|
+
- `uv run pytest tests/`
|
|
45
|
+
- `uv run pylint pizone`
|
|
46
|
+
- `uv run mypy pizone`
|
|
47
|
+
- `uv build`
|
|
48
|
+
|
|
49
|
+
To run integration tests against a controller on your network:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
uv run pytest tests/test_fullstack.py -m hardware -o addopts=
|
|
53
|
+
```
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"""Interface to the iZone air conditioner controller.
|
|
2
|
+
|
|
3
|
+
Interaction is mostly through the :class:`~pizone.controller.Controller` and
|
|
4
|
+
:class:`~pizone.zone.Zone` classes.
|
|
5
|
+
|
|
6
|
+
Synchronous property reads return cached device data and do not raise
|
|
7
|
+
:exc:`ConnectionError`. Async command and refresh methods perform HTTP I/O and
|
|
8
|
+
raise :exc:`ConnectionError` when the device cannot be reached. They raise
|
|
9
|
+
:exc:`~pizone.exceptions.ControllerCommandError` when the device responds but
|
|
10
|
+
rejects the request (``{ERROR...}`` body or HTTP 4xx).
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
from .controller import Controller
|
|
14
|
+
from .discovery import DiscoveryService, Listener, discovery
|
|
15
|
+
from .exceptions import ControllerCommandError
|
|
16
|
+
from .power import BatteryLevel, Power, PowerChannel, PowerDevice, PowerGroup
|
|
17
|
+
from .zone import Zone
|
|
18
|
+
|
|
19
|
+
__all__ = [
|
|
20
|
+
"Controller",
|
|
21
|
+
"ControllerCommandError",
|
|
22
|
+
"Zone",
|
|
23
|
+
"DiscoveryService",
|
|
24
|
+
"Listener",
|
|
25
|
+
"discovery",
|
|
26
|
+
"Power",
|
|
27
|
+
"PowerGroup",
|
|
28
|
+
"PowerDevice",
|
|
29
|
+
"PowerChannel",
|
|
30
|
+
"BatteryLevel",
|
|
31
|
+
]
|