python-izone 1.2.9__tar.gz → 1.3.0__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 (58) hide show
  1. python_izone-1.3.0/.github/workflows/main.yml +55 -0
  2. python_izone-1.3.0/.pre-commit-config.yaml +6 -0
  3. {python-izone-1.2.9 → python_izone-1.3.0}/.pylintrc +4 -8
  4. python_izone-1.3.0/.python-version +1 -0
  5. {python-izone-1.2.9 → python_izone-1.3.0}/.vscode/settings.json +14 -2
  6. python_izone-1.3.0/PKG-INFO +79 -0
  7. python_izone-1.3.0/README.md +53 -0
  8. python_izone-1.3.0/pizone/__init__.py +31 -0
  9. python_izone-1.3.0/pizone/controller.py +677 -0
  10. python_izone-1.3.0/pizone/discovery.py +525 -0
  11. python_izone-1.3.0/pizone/exceptions.py +10 -0
  12. python_izone-1.3.0/pizone/power.py +282 -0
  13. python_izone-1.3.0/pizone/py.typed +0 -0
  14. python_izone-1.3.0/pizone/version.py +24 -0
  15. python_izone-1.3.0/pizone/zone.py +209 -0
  16. python_izone-1.3.0/pyproject.toml +103 -0
  17. python_izone-1.3.0/scripts/check +8 -0
  18. python_izone-1.3.0/scripts/coverage +9 -0
  19. python_izone-1.3.0/tests/__init__.py +1 -0
  20. python_izone-1.3.0/tests/conftest.py +184 -0
  21. python_izone-1.3.0/tests/http_fakes.py +78 -0
  22. python_izone-1.3.0/tests/power_data.py +67 -0
  23. {python-izone-1.2.9 → python_izone-1.3.0}/tests/resources.py +2 -0
  24. python_izone-1.3.0/tests/test_controller.py +116 -0
  25. python_izone-1.3.0/tests/test_discovery.py +588 -0
  26. {python-izone-1.2.9 → python_izone-1.3.0}/tests/test_fullstack.py +46 -30
  27. python_izone-1.3.0/tests/test_http.py +169 -0
  28. python_izone-1.3.0/tests/test_power.py +106 -0
  29. python_izone-1.3.0/tests/test_zone.py +140 -0
  30. python_izone-1.3.0/uv.lock +732 -0
  31. python-izone-1.2.9/.github/workflows/main.yml +0 -37
  32. python-izone-1.2.9/PKG-INFO +0 -31
  33. python-izone-1.2.9/README.md +0 -10
  34. python-izone-1.2.9/pizone/__init__.py +0 -22
  35. python-izone-1.2.9/pizone/controller.py +0 -552
  36. python-izone-1.2.9/pizone/discovery.py +0 -444
  37. python-izone-1.2.9/pizone/power.py +0 -248
  38. python-izone-1.2.9/pizone/version.py +0 -5
  39. python-izone-1.2.9/pizone/zone.py +0 -180
  40. python-izone-1.2.9/pyproject.toml +0 -12
  41. python-izone-1.2.9/python_izone.egg-info/PKG-INFO +0 -31
  42. python-izone-1.2.9/python_izone.egg-info/SOURCES.txt +0 -31
  43. python-izone-1.2.9/python_izone.egg-info/dependency_links.txt +0 -1
  44. python-izone-1.2.9/python_izone.egg-info/requires.txt +0 -13
  45. python-izone-1.2.9/python_izone.egg-info/top_level.txt +0 -1
  46. python-izone-1.2.9/setup.cfg +0 -47
  47. python-izone-1.2.9/setup.py +0 -6
  48. python-izone-1.2.9/tests/__init__.py +0 -1
  49. python-izone-1.2.9/tests/conftest.py +0 -125
  50. python-izone-1.2.9/tests/test_discovery.py +0 -188
  51. {python-izone-1.2.9 → python_izone-1.3.0}/.gitattributes +0 -0
  52. {python-izone-1.2.9 → python_izone-1.3.0}/.gitignore +0 -0
  53. {python-izone-1.2.9 → python_izone-1.3.0}/.vscode/.ropeproject/config.py +0 -0
  54. {python-izone-1.2.9 → python_izone-1.3.0}/.vscode/launch.json +0 -0
  55. {python-izone-1.2.9 → python_izone-1.3.0}/api_docs/AC-DOC-1401-11_iZoneEthernetInterface.pdf +0 -0
  56. {python-izone-1.2.9 → python_izone-1.3.0}/api_docs/iPower_JSON_datastrings_Out.h +0 -0
  57. {python-izone-1.2.9 → python_izone-1.3.0}/api_docs/iZone_JSON_datastrings.h +0 -0
  58. {python-izone-1.2.9 → python_izone-1.3.0}/licence.txt +0 -0
@@ -0,0 +1,55 @@
1
+ name: CI
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ build:
7
+
8
+ runs-on: ubuntu-latest
9
+ strategy:
10
+ matrix:
11
+ python-version: ["3.14"]
12
+
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ with:
16
+ fetch-depth: 0
17
+ - name: Install uv
18
+ uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
19
+ with:
20
+ python-version: ${{ matrix.python-version }}
21
+ - name: Install dependencies
22
+ run: uv sync --frozen --all-extras --group dev
23
+ - name: Lint with Pylint
24
+ run: uv run pylint pizone
25
+ - name: Type check with mypy
26
+ run: uv run mypy pizone
27
+ - name: Test with pytest
28
+ run: uv run pytest tests/ -q
29
+ - name: Build package
30
+ run: uv build
31
+ - name: Publish package
32
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && matrix.python-version == '3.14'
33
+ uses: pypa/gh-action-pypi-publish@release/v1
34
+ with:
35
+ password: ${{ secrets.PYPI_API_TOKEN }}
36
+
37
+ coverage:
38
+ runs-on: ubuntu-latest
39
+ continue-on-error: true
40
+ steps:
41
+ - uses: actions/checkout@v4
42
+ - name: Install uv
43
+ uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
44
+ with:
45
+ python-version: "3.14"
46
+ - name: Install dependencies
47
+ run: uv sync --frozen --all-extras --group dev
48
+ - name: Test coverage (advisory)
49
+ run: uv run pytest tests/ -q --cov=pizone --cov-report=term-missing:skip-covered --cov-report=html
50
+ - name: Upload HTML coverage report
51
+ uses: actions/upload-artifact@v4
52
+ if: always()
53
+ with:
54
+ name: coverage-html
55
+ path: htmlcov/
@@ -0,0 +1,6 @@
1
+ repos:
2
+ - repo: https://github.com/psf/black
3
+ rev: 25.1.0
4
+ hooks:
5
+ - id: black
6
+ args: [--check, --diff]
@@ -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=netifaces
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
@@ -82,15 +82,11 @@ persistent=yes
82
82
 
83
83
  # Minimum Python version to use for version dependent checks. Will default to
84
84
  # the version used to run pylint.
85
- py-version=3.9
85
+ py-version=3.14
86
86
 
87
87
  # Discover python modules and packages in the file system subtree.
88
88
  recursive=no
89
89
 
90
- # When enabled, pylint would attempt to guess common misconfiguration and emit
91
- # user-friendly hints instead of false-positive error messages.
92
- suggestion-mode=yes
93
-
94
90
  # Allow loading of arbitrary C extensions. Extensions are imported into the
95
91
  # active Python interpreter and may run arbitrary code.
96
92
  unsafe-load-any-extension=no
@@ -369,8 +365,8 @@ min-public-methods=2
369
365
  [EXCEPTIONS]
370
366
 
371
367
  # Exceptions that will emit a warning when caught.
372
- overgeneral-exceptions=BaseException,
373
- Exception
368
+ overgeneral-exceptions=builtins.BaseException,
369
+ builtins.Exception
374
370
 
375
371
 
376
372
  [FORMAT]
@@ -0,0 +1 @@
1
+ 3.14
@@ -8,7 +8,19 @@
8
8
  "python.linting.pylintEnabled": true,
9
9
  "python.linting.flake8Enabled": false,
10
10
  "python.linting.mypyEnabled": true,
11
- "python.pythonPath": "venv\\Scripts\\python.exe",
11
+ "python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
12
12
  "python.globalModuleInstallation": false,
13
- "python.formatting.provider": "black"
13
+ "python.formatting.provider": "black",
14
+ "cSpell.words": [
15
+ "inetaddrs",
16
+ "inetaddr",
17
+ "ifaddresses",
18
+ "rescan",
19
+ "pizone",
20
+ "ipower",
21
+ "COOLDOWN",
22
+ "coro",
23
+ "datagram",
24
+ "fanout"
25
+ ]
14
26
  }
@@ -0,0 +1,79 @@
1
+ Metadata-Version: 2.4
2
+ Name: python-izone
3
+ Version: 1.3.0
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
+ ]