PyPlumIO 0.5.22__tar.gz → 0.5.23__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.
- {pyplumio-0.5.22 → pyplumio-0.5.23}/.pre-commit-config.yaml +2 -2
- {pyplumio-0.5.22 → pyplumio-0.5.23}/PKG-INFO +10 -8
- {pyplumio-0.5.22 → pyplumio-0.5.23}/PyPlumIO.egg-info/PKG-INFO +10 -8
- {pyplumio-0.5.22 → pyplumio-0.5.23}/PyPlumIO.egg-info/requires.txt +9 -7
- {pyplumio-0.5.22 → pyplumio-0.5.23}/docs/source/writing.rst +33 -19
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/_version.py +2 -2
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/connection.py +1 -2
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/devices/__init__.py +2 -2
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/devices/ecomax.py +17 -17
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/devices/mixer.py +6 -6
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/devices/thermostat.py +6 -6
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/helpers/event_manager.py +19 -10
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/helpers/parameter.py +114 -55
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/protocol.py +4 -3
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/ecomax_parameters.py +229 -208
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/mixer_parameters.py +80 -61
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/schedules.py +35 -15
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/thermostat_parameters.py +61 -42
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyproject.toml +12 -8
- {pyplumio-0.5.22 → pyplumio-0.5.23}/requirements.txt +1 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/requirements_docs.txt +1 -1
- pyplumio-0.5.23/requirements_test.txt +11 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/helpers/test_event_manager.py +2 -1
- pyplumio-0.5.23/tests/helpers/test_parameter.py +300 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/test_devices.py +22 -19
- pyplumio-0.5.22/requirements_test.txt +0 -11
- pyplumio-0.5.22/tests/helpers/test_parameter.py +0 -238
- {pyplumio-0.5.22 → pyplumio-0.5.23}/.gitattributes +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/.github/CODE_OF_CONDUCT.md +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/.github/dependabot.yml +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/.github/workflows/ci.yml +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/.github/workflows/codeql-analysis.yml +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/.github/workflows/deploy.yml +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/.github/workflows/documentation.yml +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/.gitignore +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/.vscode/settings.json +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/LICENSE +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/MANIFEST.in +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/PyPlumIO.egg-info/SOURCES.txt +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/PyPlumIO.egg-info/dependency_links.txt +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/PyPlumIO.egg-info/top_level.txt +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/README.md +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/docs/Makefile +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/docs/make.bat +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/docs/source/callbacks.rst +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/docs/source/conf.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/docs/source/connecting.rst +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/docs/source/frames.rst +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/docs/source/index.rst +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/docs/source/mixers_thermostats.rst +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/docs/source/protocol.rst +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/docs/source/reading.rst +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/docs/source/schedules.rst +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/images/ecomax.png +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/images/rs485.png +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/__init__.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/__main__.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/const.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/devices/ecoster.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/exceptions.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/filters.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/frames/__init__.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/frames/messages.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/frames/requests.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/frames/responses.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/helpers/__init__.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/helpers/data_types.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/helpers/factory.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/helpers/schedule.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/helpers/task_manager.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/helpers/timeout.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/helpers/uid.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/py.typed +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/stream.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/__init__.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/alerts.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/boiler_load.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/boiler_power.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/fan_power.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/frame_versions.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/fuel_consumption.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/fuel_level.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/lambda_sensor.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/mixer_sensors.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/modules.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/network_info.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/output_flags.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/outputs.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/pending_alerts.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/product_info.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/program_version.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/regulator_data.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/regulator_data_schema.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/statuses.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/temperatures.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/thermostat_sensors.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/utils.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/setup.cfg +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/__init__.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/conftest.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/frames/test_init.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/frames/test_messages.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/frames/test_requests.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/frames/test_responses.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/helpers/__init__.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/helpers/test_data_types.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/helpers/test_factory.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/helpers/test_schedule.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/helpers/test_task_manager.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/helpers/test_timeout.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/helpers/test_uid.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/ruff.toml +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/test_connection.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/test_filters.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/test_init.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/test_main.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/test_protocol.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/test_stream.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/test_utils.py +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/messages/regulator_data.json +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/messages/sensor_data.json +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/requests/alerts.json +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/requests/ecomax_control.json +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/requests/ecomax_parameters.json +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/requests/mixer_parameters.json +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/requests/set_ecomax_parameter.json +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/requests/set_mixer_parameter.json +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/requests/set_schedule.json +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/requests/set_thermostat_parameter.json +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/requests/thermostat_parameters.json +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/responses/alerts.json +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/responses/device_available.json +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/responses/ecomax_parameters.json +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/responses/mixer_parameters.json +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/responses/password.json +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/responses/program_version.json +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/responses/regulator_data_schema.json +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/responses/schedules.json +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/responses/thermostat_parameters.json +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/responses/uid.json +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/unknown/unknown_ecomax_parameter.json +0 -0
- {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/unknown/unknown_mixer_parameter.json +0 -0
@@ -2,7 +2,7 @@
|
|
2
2
|
# See https://pre-commit.com/hooks.html for more hooks
|
3
3
|
repos:
|
4
4
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
5
|
-
rev: v0.5.
|
5
|
+
rev: v0.5.5
|
6
6
|
hooks:
|
7
7
|
- id: ruff
|
8
8
|
args:
|
@@ -12,6 +12,6 @@ repos:
|
|
12
12
|
hooks:
|
13
13
|
- id: codespell
|
14
14
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
15
|
-
rev: v1.
|
15
|
+
rev: v1.11.0
|
16
16
|
hooks:
|
17
17
|
- id: mypy
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: PyPlumIO
|
3
|
-
Version: 0.5.
|
3
|
+
Version: 0.5.23
|
4
4
|
Summary: PyPlumIO is a native ecoNET library for Plum ecoMAX controllers.
|
5
5
|
Author-email: Denis Paavilainen <denpa@denpa.pro>
|
6
6
|
License: MIT License
|
@@ -22,24 +22,26 @@ Classifier: Topic :: Home Automation
|
|
22
22
|
Requires-Python: >=3.9
|
23
23
|
Description-Content-Type: text/markdown
|
24
24
|
License-File: LICENSE
|
25
|
+
Requires-Dist: dataslots==1.2.0
|
25
26
|
Requires-Dist: pyserial-asyncio==0.6
|
27
|
+
Requires-Dist: typing-extensions==4.12.2
|
26
28
|
Provides-Extra: test
|
27
29
|
Requires-Dist: codespell==2.3.0; extra == "test"
|
28
30
|
Requires-Dist: coverage==7.6.0; extra == "test"
|
29
|
-
Requires-Dist: mypy==1.
|
30
|
-
Requires-Dist: pyserial-asyncio-fast==0.
|
31
|
-
Requires-Dist: pytest==8.
|
32
|
-
Requires-Dist: pytest-asyncio==0.23.
|
33
|
-
Requires-Dist: ruff==0.5.
|
31
|
+
Requires-Dist: mypy==1.11.1; extra == "test"
|
32
|
+
Requires-Dist: pyserial-asyncio-fast==0.14; extra == "test"
|
33
|
+
Requires-Dist: pytest==8.3.2; extra == "test"
|
34
|
+
Requires-Dist: pytest-asyncio==0.23.8; extra == "test"
|
35
|
+
Requires-Dist: ruff==0.5.5; extra == "test"
|
34
36
|
Requires-Dist: tox==4.16.0; extra == "test"
|
35
37
|
Requires-Dist: types-pyserial==3.5.0.20240527; extra == "test"
|
36
38
|
Provides-Extra: docs
|
37
|
-
Requires-Dist: sphinx==7.4.
|
39
|
+
Requires-Dist: sphinx==7.4.7; extra == "docs"
|
38
40
|
Requires-Dist: sphinx_rtd_theme==2.0.0; extra == "docs"
|
39
41
|
Requires-Dist: readthedocs-sphinx-search==0.3.2; extra == "docs"
|
40
42
|
Provides-Extra: dev
|
41
43
|
Requires-Dist: pyplumio[docs,test]; extra == "dev"
|
42
|
-
Requires-Dist: pre-commit==3.
|
44
|
+
Requires-Dist: pre-commit==3.8.0; extra == "dev"
|
43
45
|
Requires-Dist: tomli==2.0.1; extra == "dev"
|
44
46
|
|
45
47
|
# PyPlumIO is a native ecoNET library for Plum ecoMAX controllers.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: PyPlumIO
|
3
|
-
Version: 0.5.
|
3
|
+
Version: 0.5.23
|
4
4
|
Summary: PyPlumIO is a native ecoNET library for Plum ecoMAX controllers.
|
5
5
|
Author-email: Denis Paavilainen <denpa@denpa.pro>
|
6
6
|
License: MIT License
|
@@ -22,24 +22,26 @@ Classifier: Topic :: Home Automation
|
|
22
22
|
Requires-Python: >=3.9
|
23
23
|
Description-Content-Type: text/markdown
|
24
24
|
License-File: LICENSE
|
25
|
+
Requires-Dist: dataslots==1.2.0
|
25
26
|
Requires-Dist: pyserial-asyncio==0.6
|
27
|
+
Requires-Dist: typing-extensions==4.12.2
|
26
28
|
Provides-Extra: test
|
27
29
|
Requires-Dist: codespell==2.3.0; extra == "test"
|
28
30
|
Requires-Dist: coverage==7.6.0; extra == "test"
|
29
|
-
Requires-Dist: mypy==1.
|
30
|
-
Requires-Dist: pyserial-asyncio-fast==0.
|
31
|
-
Requires-Dist: pytest==8.
|
32
|
-
Requires-Dist: pytest-asyncio==0.23.
|
33
|
-
Requires-Dist: ruff==0.5.
|
31
|
+
Requires-Dist: mypy==1.11.1; extra == "test"
|
32
|
+
Requires-Dist: pyserial-asyncio-fast==0.14; extra == "test"
|
33
|
+
Requires-Dist: pytest==8.3.2; extra == "test"
|
34
|
+
Requires-Dist: pytest-asyncio==0.23.8; extra == "test"
|
35
|
+
Requires-Dist: ruff==0.5.5; extra == "test"
|
34
36
|
Requires-Dist: tox==4.16.0; extra == "test"
|
35
37
|
Requires-Dist: types-pyserial==3.5.0.20240527; extra == "test"
|
36
38
|
Provides-Extra: docs
|
37
|
-
Requires-Dist: sphinx==7.4.
|
39
|
+
Requires-Dist: sphinx==7.4.7; extra == "docs"
|
38
40
|
Requires-Dist: sphinx_rtd_theme==2.0.0; extra == "docs"
|
39
41
|
Requires-Dist: readthedocs-sphinx-search==0.3.2; extra == "docs"
|
40
42
|
Provides-Extra: dev
|
41
43
|
Requires-Dist: pyplumio[docs,test]; extra == "dev"
|
42
|
-
Requires-Dist: pre-commit==3.
|
44
|
+
Requires-Dist: pre-commit==3.8.0; extra == "dev"
|
43
45
|
Requires-Dist: tomli==2.0.1; extra == "dev"
|
44
46
|
|
45
47
|
# PyPlumIO is a native ecoNET library for Plum ecoMAX controllers.
|
@@ -1,22 +1,24 @@
|
|
1
|
+
dataslots==1.2.0
|
1
2
|
pyserial-asyncio==0.6
|
3
|
+
typing-extensions==4.12.2
|
2
4
|
|
3
5
|
[dev]
|
4
6
|
pyplumio[docs,test]
|
5
|
-
pre-commit==3.
|
7
|
+
pre-commit==3.8.0
|
6
8
|
tomli==2.0.1
|
7
9
|
|
8
10
|
[docs]
|
9
|
-
sphinx==7.4.
|
11
|
+
sphinx==7.4.7
|
10
12
|
sphinx_rtd_theme==2.0.0
|
11
13
|
readthedocs-sphinx-search==0.3.2
|
12
14
|
|
13
15
|
[test]
|
14
16
|
codespell==2.3.0
|
15
17
|
coverage==7.6.0
|
16
|
-
mypy==1.
|
17
|
-
pyserial-asyncio-fast==0.
|
18
|
-
pytest==8.
|
19
|
-
pytest-asyncio==0.23.
|
20
|
-
ruff==0.5.
|
18
|
+
mypy==1.11.1
|
19
|
+
pyserial-asyncio-fast==0.14
|
20
|
+
pytest==8.3.2
|
21
|
+
pytest-asyncio==0.23.8
|
22
|
+
ruff==0.5.5
|
21
23
|
tox==4.16.0
|
22
24
|
types-pyserial==3.5.0.20240527
|
@@ -32,45 +32,57 @@ Parameters
|
|
32
32
|
----------
|
33
33
|
|
34
34
|
It's possible to get the ``Parameter`` object and then modify it using
|
35
|
-
it's own setter methods.
|
35
|
+
it's own setter methods.
|
36
|
+
|
37
|
+
.. autoclass:: pyplumio.helpers.parameter.Parameter
|
38
|
+
|
39
|
+
When using the parameter object, you don't
|
36
40
|
need to pass the parameter name.
|
37
41
|
|
38
|
-
|
42
|
+
Numbers
|
43
|
+
^^^^^^^
|
44
|
+
|
45
|
+
Numbers are parameters that have numerical value associated with them.
|
39
46
|
|
40
|
-
|
47
|
+
.. code-block:: python
|
41
48
|
|
49
|
+
from pyplumio.helpers.parameter import Number
|
42
50
|
|
43
51
|
ecomax = await conn.get("ecomax")
|
44
|
-
heating_target:
|
52
|
+
heating_target: Number = ecomax.get("heating_target_temp")
|
45
53
|
result = heating_target.set(65)
|
46
54
|
|
47
|
-
Each
|
48
|
-
PyPlumIO will raise ``ValueError`` if value
|
49
|
-
|
55
|
+
Each number has a range of allowed values.
|
56
|
+
PyPlumIO will raise ``ValueError`` if value isn't within acceptable
|
57
|
+
range.
|
50
58
|
|
51
59
|
You can check allowed range by reading ``min_value`` and ``max_value``
|
52
60
|
properties of the parameter object. Both values are **inclusive**.
|
53
61
|
|
54
62
|
.. code-block:: python
|
55
63
|
|
64
|
+
from pyplumio.helpers.parameter import Number
|
65
|
+
|
56
66
|
ecomax = await connection.get("ecomax")
|
57
|
-
target_temp = await ecomax.get("heating_target_temp")
|
67
|
+
target_temp: Number = await ecomax.get("heating_target_temp")
|
58
68
|
print(target_temp.min_value) # Minimum allowed target temperature.
|
59
69
|
print(target_temp.max_value) # Maximum allowed target temperature.
|
60
70
|
|
61
|
-
|
62
|
-
|
71
|
+
Switches
|
72
|
+
^^^^^^^^
|
63
73
|
|
64
|
-
|
74
|
+
Switches are parameters that could only have two possible states: on or off.
|
75
|
+
|
76
|
+
Thus, for switches, you can use boolean `True` or `False`,
|
65
77
|
string literals "on" or "off" or special ``turn_on()`` and
|
66
78
|
``turn_off()`` methods.
|
67
79
|
|
68
|
-
.. autofunction:: pyplumio.helpers.parameter.
|
69
|
-
.. autofunction:: pyplumio.helpers.parameter.
|
70
|
-
.. autofunction:: pyplumio.helpers.parameter.
|
71
|
-
.. autofunction:: pyplumio.helpers.parameter.
|
80
|
+
.. autofunction:: pyplumio.helpers.parameter.Switch.turn_on
|
81
|
+
.. autofunction:: pyplumio.helpers.parameter.Switch.turn_on_nowait
|
82
|
+
.. autofunction:: pyplumio.helpers.parameter.Switch.turn_off
|
83
|
+
.. autofunction:: pyplumio.helpers.parameter.Switch.turn_off_nowait
|
72
84
|
|
73
|
-
One such
|
85
|
+
One such switch is "ecomax_control" that allows you to switch
|
74
86
|
the ecoMAX on or off.
|
75
87
|
|
76
88
|
.. code-block:: python
|
@@ -83,12 +95,14 @@ object.
|
|
83
95
|
|
84
96
|
.. code-block:: python
|
85
97
|
|
98
|
+
from pyplumio.helpers.parameter import Switch
|
99
|
+
|
86
100
|
# Get an ecomax_control parameter and turn it on.
|
87
|
-
ecomax_control = await ecomax.get("ecomax_control")
|
101
|
+
ecomax_control: Switch = await ecomax.get("ecomax_control")
|
88
102
|
result = await ecomax_control.turn_on()
|
89
103
|
|
90
|
-
If you simply want to turn on or off the ecoMAX controller
|
91
|
-
handy shortcut built
|
104
|
+
If you simply want to turn on or off the ecoMAX controller itself,
|
105
|
+
there's a handy shortcut built in the controller handler.
|
92
106
|
|
93
107
|
.. code-block:: python
|
94
108
|
|
@@ -4,7 +4,6 @@ from __future__ import annotations
|
|
4
4
|
|
5
5
|
from abc import ABC, abstractmethod
|
6
6
|
import asyncio
|
7
|
-
from collections.abc import MutableMapping
|
8
7
|
import logging
|
9
8
|
from typing import Any, Final, cast
|
10
9
|
|
@@ -36,7 +35,7 @@ class Connection(ABC, TaskManager):
|
|
36
35
|
|
37
36
|
_protocol: Protocol
|
38
37
|
_reconnect_on_failure: bool
|
39
|
-
_kwargs:
|
38
|
+
_kwargs: dict[str, Any]
|
40
39
|
|
41
40
|
def __init__(
|
42
41
|
self,
|
@@ -63,7 +63,7 @@ class Device(ABC, EventManager):
|
|
63
63
|
:param name: Name of the parameter
|
64
64
|
:type name: str
|
65
65
|
:param value: New value for the parameter
|
66
|
-
:type value: int | float | bool | Literal["
|
66
|
+
:type value: int | float | bool | Literal["off", "on"]
|
67
67
|
:param timeout: Wait this amount of seconds for confirmation,
|
68
68
|
defaults to `None`
|
69
69
|
:type timeout: float, optional
|
@@ -95,7 +95,7 @@ class Device(ABC, EventManager):
|
|
95
95
|
:param name: Name of the parameter
|
96
96
|
:type name: str
|
97
97
|
:param value: New value for the parameter
|
98
|
-
:type value: int | float | bool | Literal["
|
98
|
+
:type value: int | float | bool | Literal["off", "on"]
|
99
99
|
:param timeout: Wait this amount of seconds for confirmation.
|
100
100
|
As this method operates in the background without waiting,
|
101
101
|
this value is used to determine failure when
|
@@ -31,9 +31,9 @@ from pyplumio.structures.ecomax_parameters import (
|
|
31
31
|
ECOMAX_CONTROL_PARAMETER,
|
32
32
|
ECOMAX_PARAMETERS,
|
33
33
|
THERMOSTAT_PROFILE_PARAMETER,
|
34
|
-
|
35
|
-
|
36
|
-
|
34
|
+
EcomaxNumber,
|
35
|
+
EcomaxSwitch,
|
36
|
+
EcomaxSwitchDescription,
|
37
37
|
)
|
38
38
|
from pyplumio.structures.frame_versions import ATTR_FRAME_VERSIONS
|
39
39
|
from pyplumio.structures.fuel_consumption import ATTR_FUEL_CONSUMPTION
|
@@ -47,9 +47,9 @@ from pyplumio.structures.schedules import (
|
|
47
47
|
ATTR_SCHEDULES,
|
48
48
|
SCHEDULE_PARAMETERS,
|
49
49
|
SCHEDULES,
|
50
|
-
|
51
|
-
|
52
|
-
|
50
|
+
ScheduleNumber,
|
51
|
+
ScheduleSwitch,
|
52
|
+
ScheduleSwitchDescription,
|
53
53
|
)
|
54
54
|
from pyplumio.structures.thermostat_parameters import (
|
55
55
|
ATTR_THERMOSTAT_PARAMETERS,
|
@@ -209,9 +209,9 @@ class EcoMAX(AddressableDevice):
|
|
209
209
|
)
|
210
210
|
|
211
211
|
handler = (
|
212
|
-
|
213
|
-
if isinstance(description,
|
214
|
-
else
|
212
|
+
EcomaxSwitch
|
213
|
+
if isinstance(description, EcomaxSwitchDescription)
|
214
|
+
else EcomaxNumber
|
215
215
|
)
|
216
216
|
yield self.dispatch(
|
217
217
|
description.name,
|
@@ -325,9 +325,9 @@ class EcoMAX(AddressableDevice):
|
|
325
325
|
for index, values in parameters:
|
326
326
|
description = SCHEDULE_PARAMETERS[index]
|
327
327
|
handler = (
|
328
|
-
|
329
|
-
if isinstance(description,
|
330
|
-
else
|
328
|
+
ScheduleSwitch
|
329
|
+
if isinstance(description, ScheduleSwitchDescription)
|
330
|
+
else ScheduleNumber
|
331
331
|
)
|
332
332
|
yield self.dispatch(
|
333
333
|
description.name,
|
@@ -357,7 +357,7 @@ class EcoMAX(AddressableDevice):
|
|
357
357
|
"""Create ecoMAX control parameter instance and dispatch an event."""
|
358
358
|
await self.dispatch(
|
359
359
|
ECOMAX_CONTROL_PARAMETER.name,
|
360
|
-
|
360
|
+
EcomaxSwitch.create_or_update(
|
361
361
|
description=ECOMAX_CONTROL_PARAMETER,
|
362
362
|
device=self,
|
363
363
|
values=ParameterValues(
|
@@ -391,12 +391,12 @@ class EcoMAX(AddressableDevice):
|
|
391
391
|
|
392
392
|
async def _add_thermostat_profile_parameter(
|
393
393
|
self, values: ParameterValues | None
|
394
|
-
) ->
|
394
|
+
) -> EcomaxNumber | None:
|
395
395
|
"""Add thermostat profile parameter to the dataset."""
|
396
396
|
if not values:
|
397
397
|
return None
|
398
398
|
|
399
|
-
return
|
399
|
+
return EcomaxNumber(
|
400
400
|
device=self, description=THERMOSTAT_PROFILE_PARAMETER, values=values
|
401
401
|
)
|
402
402
|
|
@@ -425,7 +425,7 @@ class EcoMAX(AddressableDevice):
|
|
425
425
|
async def turn_on(self) -> bool:
|
426
426
|
"""Turn on the ecoMAX controller."""
|
427
427
|
try:
|
428
|
-
ecomax_control:
|
428
|
+
ecomax_control: EcomaxSwitch = self.data[ATTR_ECOMAX_CONTROL]
|
429
429
|
return await ecomax_control.turn_on()
|
430
430
|
except KeyError:
|
431
431
|
_LOGGER.error("ecoMAX control isn't available, please try later")
|
@@ -434,7 +434,7 @@ class EcoMAX(AddressableDevice):
|
|
434
434
|
async def turn_off(self) -> bool:
|
435
435
|
"""Turn off the ecoMAX controller."""
|
436
436
|
try:
|
437
|
-
ecomax_control:
|
437
|
+
ecomax_control: EcomaxSwitch = self.data[ATTR_ECOMAX_CONTROL]
|
438
438
|
return await ecomax_control.turn_off()
|
439
439
|
except KeyError:
|
440
440
|
_LOGGER.error("ecoMAX control isn't available, please try later")
|
@@ -12,9 +12,9 @@ from pyplumio.helpers.parameter import ParameterValues
|
|
12
12
|
from pyplumio.structures.mixer_parameters import (
|
13
13
|
ATTR_MIXER_PARAMETERS,
|
14
14
|
MIXER_PARAMETERS,
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
MixerNumber,
|
16
|
+
MixerSwitch,
|
17
|
+
MixerSwitchDescription,
|
18
18
|
)
|
19
19
|
from pyplumio.structures.mixer_sensors import ATTR_MIXER_SENSORS
|
20
20
|
from pyplumio.structures.product_info import ATTR_PRODUCT, ProductInfo
|
@@ -78,9 +78,9 @@ class Mixer(SubDevice):
|
|
78
78
|
return
|
79
79
|
|
80
80
|
handler = (
|
81
|
-
|
82
|
-
if isinstance(description,
|
83
|
-
else
|
81
|
+
MixerSwitch
|
82
|
+
if isinstance(description, MixerSwitchDescription)
|
83
|
+
else MixerNumber
|
84
84
|
)
|
85
85
|
yield self.dispatch(
|
86
86
|
description.name,
|
@@ -11,9 +11,9 @@ from pyplumio.helpers.parameter import ParameterValues
|
|
11
11
|
from pyplumio.structures.thermostat_parameters import (
|
12
12
|
ATTR_THERMOSTAT_PARAMETERS,
|
13
13
|
THERMOSTAT_PARAMETERS,
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
ThermostatNumber,
|
15
|
+
ThermostatSwitch,
|
16
|
+
ThermostatSwitchDescription,
|
17
17
|
)
|
18
18
|
from pyplumio.structures.thermostat_sensors import ATTR_THERMOSTAT_SENSORS
|
19
19
|
|
@@ -57,9 +57,9 @@ class Thermostat(SubDevice):
|
|
57
57
|
for index, values in parameters:
|
58
58
|
description = THERMOSTAT_PARAMETERS[index]
|
59
59
|
handler = (
|
60
|
-
|
61
|
-
if isinstance(description,
|
62
|
-
else
|
60
|
+
ThermostatSwitch
|
61
|
+
if isinstance(description, ThermostatSwitchDescription)
|
62
|
+
else ThermostatNumber
|
63
63
|
)
|
64
64
|
yield self.dispatch(
|
65
65
|
description.name,
|
@@ -4,20 +4,23 @@ from __future__ import annotations
|
|
4
4
|
|
5
5
|
import asyncio
|
6
6
|
from collections.abc import Callable, Coroutine
|
7
|
-
from typing import Any, TypeVar
|
7
|
+
from typing import Any, Generic, TypeVar, overload
|
8
|
+
|
9
|
+
from typing_extensions import TypeAlias
|
8
10
|
|
9
11
|
from pyplumio.helpers.task_manager import TaskManager
|
10
12
|
|
11
|
-
Callback = Callable[[Any], Coroutine[Any, Any, Any]]
|
13
|
+
Callback: TypeAlias = Callable[[Any], Coroutine[Any, Any, Any]]
|
12
14
|
CallbackT = TypeVar("CallbackT", bound=Callback)
|
15
|
+
T = TypeVar("T")
|
13
16
|
|
14
17
|
|
15
|
-
class EventManager(TaskManager):
|
18
|
+
class EventManager(TaskManager, Generic[T]):
|
16
19
|
"""Represents an event manager."""
|
17
20
|
|
18
21
|
__slots__ = ("data", "_events", "_callbacks")
|
19
22
|
|
20
|
-
data: dict[str,
|
23
|
+
data: dict[str, T]
|
21
24
|
_events: dict[str, asyncio.Event]
|
22
25
|
_callbacks: dict[str, list[Callback]]
|
23
26
|
|
@@ -28,7 +31,7 @@ class EventManager(TaskManager):
|
|
28
31
|
self._events = {}
|
29
32
|
self._callbacks = {}
|
30
33
|
|
31
|
-
def __getattr__(self, name: str) ->
|
34
|
+
def __getattr__(self, name: str) -> T:
|
32
35
|
"""Return attributes from the underlying data dictionary."""
|
33
36
|
try:
|
34
37
|
return self.data[name]
|
@@ -48,7 +51,7 @@ class EventManager(TaskManager):
|
|
48
51
|
if name not in self.data:
|
49
52
|
await asyncio.wait_for(self.create_event(name).wait(), timeout=timeout)
|
50
53
|
|
51
|
-
async def get(self, name: str, timeout: float | None = None) ->
|
54
|
+
async def get(self, name: str, timeout: float | None = None) -> T:
|
52
55
|
"""Get the value by name.
|
53
56
|
|
54
57
|
:param name: Event name or ID
|
@@ -62,6 +65,12 @@ class EventManager(TaskManager):
|
|
62
65
|
await self.wait_for(name, timeout=timeout)
|
63
66
|
return self.data[name]
|
64
67
|
|
68
|
+
@overload
|
69
|
+
def get_nowait(self, name: str, default: None = ...) -> T | None: ...
|
70
|
+
|
71
|
+
@overload
|
72
|
+
def get_nowait(self, name: str, default: T) -> T: ...
|
73
|
+
|
65
74
|
def get_nowait(self, name: str, default: Any = None) -> Any:
|
66
75
|
"""Get the value by name without waiting.
|
67
76
|
|
@@ -136,7 +145,7 @@ class EventManager(TaskManager):
|
|
136
145
|
|
137
146
|
return False
|
138
147
|
|
139
|
-
async def dispatch(self, name: str, value:
|
148
|
+
async def dispatch(self, name: str, value: T) -> None:
|
140
149
|
"""Call registered callbacks and dispatch the event."""
|
141
150
|
if callbacks := self._callbacks.get(name, None):
|
142
151
|
for callback in list(callbacks):
|
@@ -146,17 +155,17 @@ class EventManager(TaskManager):
|
|
146
155
|
self.data[name] = value
|
147
156
|
self.set_event(name)
|
148
157
|
|
149
|
-
def dispatch_nowait(self, name: str, value:
|
158
|
+
def dispatch_nowait(self, name: str, value: T) -> None:
|
150
159
|
"""Call a registered callbacks and dispatch the event without waiting."""
|
151
160
|
self.create_task(self.dispatch(name, value))
|
152
161
|
|
153
|
-
async def load(self, data: dict[str,
|
162
|
+
async def load(self, data: dict[str, T]) -> None:
|
154
163
|
"""Load event data."""
|
155
164
|
await asyncio.gather(
|
156
165
|
*(self.dispatch(name, value) for name, value in data.items())
|
157
166
|
)
|
158
167
|
|
159
|
-
def load_nowait(self, data: dict[str,
|
168
|
+
def load_nowait(self, data: dict[str, T]) -> None:
|
160
169
|
"""Load event data without waiting."""
|
161
170
|
self.create_task(self.load(data))
|
162
171
|
|