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.
Files changed (144) hide show
  1. {pyplumio-0.5.22 → pyplumio-0.5.23}/.pre-commit-config.yaml +2 -2
  2. {pyplumio-0.5.22 → pyplumio-0.5.23}/PKG-INFO +10 -8
  3. {pyplumio-0.5.22 → pyplumio-0.5.23}/PyPlumIO.egg-info/PKG-INFO +10 -8
  4. {pyplumio-0.5.22 → pyplumio-0.5.23}/PyPlumIO.egg-info/requires.txt +9 -7
  5. {pyplumio-0.5.22 → pyplumio-0.5.23}/docs/source/writing.rst +33 -19
  6. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/_version.py +2 -2
  7. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/connection.py +1 -2
  8. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/devices/__init__.py +2 -2
  9. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/devices/ecomax.py +17 -17
  10. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/devices/mixer.py +6 -6
  11. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/devices/thermostat.py +6 -6
  12. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/helpers/event_manager.py +19 -10
  13. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/helpers/parameter.py +114 -55
  14. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/protocol.py +4 -3
  15. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/ecomax_parameters.py +229 -208
  16. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/mixer_parameters.py +80 -61
  17. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/schedules.py +35 -15
  18. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/thermostat_parameters.py +61 -42
  19. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyproject.toml +12 -8
  20. {pyplumio-0.5.22 → pyplumio-0.5.23}/requirements.txt +1 -0
  21. {pyplumio-0.5.22 → pyplumio-0.5.23}/requirements_docs.txt +1 -1
  22. pyplumio-0.5.23/requirements_test.txt +11 -0
  23. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/helpers/test_event_manager.py +2 -1
  24. pyplumio-0.5.23/tests/helpers/test_parameter.py +300 -0
  25. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/test_devices.py +22 -19
  26. pyplumio-0.5.22/requirements_test.txt +0 -11
  27. pyplumio-0.5.22/tests/helpers/test_parameter.py +0 -238
  28. {pyplumio-0.5.22 → pyplumio-0.5.23}/.gitattributes +0 -0
  29. {pyplumio-0.5.22 → pyplumio-0.5.23}/.github/CODE_OF_CONDUCT.md +0 -0
  30. {pyplumio-0.5.22 → pyplumio-0.5.23}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  31. {pyplumio-0.5.22 → pyplumio-0.5.23}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  32. {pyplumio-0.5.22 → pyplumio-0.5.23}/.github/dependabot.yml +0 -0
  33. {pyplumio-0.5.22 → pyplumio-0.5.23}/.github/workflows/ci.yml +0 -0
  34. {pyplumio-0.5.22 → pyplumio-0.5.23}/.github/workflows/codeql-analysis.yml +0 -0
  35. {pyplumio-0.5.22 → pyplumio-0.5.23}/.github/workflows/deploy.yml +0 -0
  36. {pyplumio-0.5.22 → pyplumio-0.5.23}/.github/workflows/documentation.yml +0 -0
  37. {pyplumio-0.5.22 → pyplumio-0.5.23}/.gitignore +0 -0
  38. {pyplumio-0.5.22 → pyplumio-0.5.23}/.vscode/settings.json +0 -0
  39. {pyplumio-0.5.22 → pyplumio-0.5.23}/LICENSE +0 -0
  40. {pyplumio-0.5.22 → pyplumio-0.5.23}/MANIFEST.in +0 -0
  41. {pyplumio-0.5.22 → pyplumio-0.5.23}/PyPlumIO.egg-info/SOURCES.txt +0 -0
  42. {pyplumio-0.5.22 → pyplumio-0.5.23}/PyPlumIO.egg-info/dependency_links.txt +0 -0
  43. {pyplumio-0.5.22 → pyplumio-0.5.23}/PyPlumIO.egg-info/top_level.txt +0 -0
  44. {pyplumio-0.5.22 → pyplumio-0.5.23}/README.md +0 -0
  45. {pyplumio-0.5.22 → pyplumio-0.5.23}/docs/Makefile +0 -0
  46. {pyplumio-0.5.22 → pyplumio-0.5.23}/docs/make.bat +0 -0
  47. {pyplumio-0.5.22 → pyplumio-0.5.23}/docs/source/callbacks.rst +0 -0
  48. {pyplumio-0.5.22 → pyplumio-0.5.23}/docs/source/conf.py +0 -0
  49. {pyplumio-0.5.22 → pyplumio-0.5.23}/docs/source/connecting.rst +0 -0
  50. {pyplumio-0.5.22 → pyplumio-0.5.23}/docs/source/frames.rst +0 -0
  51. {pyplumio-0.5.22 → pyplumio-0.5.23}/docs/source/index.rst +0 -0
  52. {pyplumio-0.5.22 → pyplumio-0.5.23}/docs/source/mixers_thermostats.rst +0 -0
  53. {pyplumio-0.5.22 → pyplumio-0.5.23}/docs/source/protocol.rst +0 -0
  54. {pyplumio-0.5.22 → pyplumio-0.5.23}/docs/source/reading.rst +0 -0
  55. {pyplumio-0.5.22 → pyplumio-0.5.23}/docs/source/schedules.rst +0 -0
  56. {pyplumio-0.5.22 → pyplumio-0.5.23}/images/ecomax.png +0 -0
  57. {pyplumio-0.5.22 → pyplumio-0.5.23}/images/rs485.png +0 -0
  58. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/__init__.py +0 -0
  59. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/__main__.py +0 -0
  60. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/const.py +0 -0
  61. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/devices/ecoster.py +0 -0
  62. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/exceptions.py +0 -0
  63. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/filters.py +0 -0
  64. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/frames/__init__.py +0 -0
  65. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/frames/messages.py +0 -0
  66. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/frames/requests.py +0 -0
  67. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/frames/responses.py +0 -0
  68. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/helpers/__init__.py +0 -0
  69. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/helpers/data_types.py +0 -0
  70. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/helpers/factory.py +0 -0
  71. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/helpers/schedule.py +0 -0
  72. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/helpers/task_manager.py +0 -0
  73. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/helpers/timeout.py +0 -0
  74. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/helpers/uid.py +0 -0
  75. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/py.typed +0 -0
  76. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/stream.py +0 -0
  77. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/__init__.py +0 -0
  78. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/alerts.py +0 -0
  79. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/boiler_load.py +0 -0
  80. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/boiler_power.py +0 -0
  81. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/fan_power.py +0 -0
  82. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/frame_versions.py +0 -0
  83. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/fuel_consumption.py +0 -0
  84. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/fuel_level.py +0 -0
  85. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/lambda_sensor.py +0 -0
  86. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/mixer_sensors.py +0 -0
  87. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/modules.py +0 -0
  88. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/network_info.py +0 -0
  89. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/output_flags.py +0 -0
  90. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/outputs.py +0 -0
  91. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/pending_alerts.py +0 -0
  92. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/product_info.py +0 -0
  93. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/program_version.py +0 -0
  94. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/regulator_data.py +0 -0
  95. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/regulator_data_schema.py +0 -0
  96. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/statuses.py +0 -0
  97. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/temperatures.py +0 -0
  98. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/structures/thermostat_sensors.py +0 -0
  99. {pyplumio-0.5.22 → pyplumio-0.5.23}/pyplumio/utils.py +0 -0
  100. {pyplumio-0.5.22 → pyplumio-0.5.23}/setup.cfg +0 -0
  101. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/__init__.py +0 -0
  102. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/conftest.py +0 -0
  103. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/frames/test_init.py +0 -0
  104. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/frames/test_messages.py +0 -0
  105. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/frames/test_requests.py +0 -0
  106. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/frames/test_responses.py +0 -0
  107. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/helpers/__init__.py +0 -0
  108. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/helpers/test_data_types.py +0 -0
  109. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/helpers/test_factory.py +0 -0
  110. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/helpers/test_schedule.py +0 -0
  111. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/helpers/test_task_manager.py +0 -0
  112. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/helpers/test_timeout.py +0 -0
  113. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/helpers/test_uid.py +0 -0
  114. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/ruff.toml +0 -0
  115. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/test_connection.py +0 -0
  116. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/test_filters.py +0 -0
  117. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/test_init.py +0 -0
  118. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/test_main.py +0 -0
  119. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/test_protocol.py +0 -0
  120. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/test_stream.py +0 -0
  121. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/test_utils.py +0 -0
  122. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/messages/regulator_data.json +0 -0
  123. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/messages/sensor_data.json +0 -0
  124. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/requests/alerts.json +0 -0
  125. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/requests/ecomax_control.json +0 -0
  126. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/requests/ecomax_parameters.json +0 -0
  127. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/requests/mixer_parameters.json +0 -0
  128. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/requests/set_ecomax_parameter.json +0 -0
  129. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/requests/set_mixer_parameter.json +0 -0
  130. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/requests/set_schedule.json +0 -0
  131. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/requests/set_thermostat_parameter.json +0 -0
  132. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/requests/thermostat_parameters.json +0 -0
  133. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/responses/alerts.json +0 -0
  134. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/responses/device_available.json +0 -0
  135. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/responses/ecomax_parameters.json +0 -0
  136. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/responses/mixer_parameters.json +0 -0
  137. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/responses/password.json +0 -0
  138. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/responses/program_version.json +0 -0
  139. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/responses/regulator_data_schema.json +0 -0
  140. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/responses/schedules.json +0 -0
  141. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/responses/thermostat_parameters.json +0 -0
  142. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/responses/uid.json +0 -0
  143. {pyplumio-0.5.22 → pyplumio-0.5.23}/tests/testdata/unknown/unknown_ecomax_parameter.json +0 -0
  144. {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.0
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.10.1
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.22
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.10.1; extra == "test"
30
- Requires-Dist: pyserial-asyncio-fast==0.13; extra == "test"
31
- Requires-Dist: pytest==8.2.2; extra == "test"
32
- Requires-Dist: pytest-asyncio==0.23.7; extra == "test"
33
- Requires-Dist: ruff==0.5.2; extra == "test"
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.0; extra == "docs"
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.7.1; extra == "dev"
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.22
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.10.1; extra == "test"
30
- Requires-Dist: pyserial-asyncio-fast==0.13; extra == "test"
31
- Requires-Dist: pytest==8.2.2; extra == "test"
32
- Requires-Dist: pytest-asyncio==0.23.7; extra == "test"
33
- Requires-Dist: ruff==0.5.2; extra == "test"
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.0; extra == "docs"
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.7.1; extra == "dev"
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.1
7
+ pre-commit==3.8.0
6
8
  tomli==2.0.1
7
9
 
8
10
  [docs]
9
- sphinx==7.4.0
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.10.1
17
- pyserial-asyncio-fast==0.13
18
- pytest==8.2.2
19
- pytest-asyncio==0.23.7
20
- ruff==0.5.2
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. When using the parameter object, you don't
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
- .. code-block:: python
42
+ Numbers
43
+ ^^^^^^^
44
+
45
+ Numbers are parameters that have numerical value associated with them.
39
46
 
40
- from pyplumio.helpers.parameter import Parameter
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: Parameter = ecomax.get("heating_target_temp")
52
+ heating_target: Number = ecomax.get("heating_target_temp")
45
53
  result = heating_target.set(65)
46
54
 
47
- Each parameter has a range of allowed values.
48
- PyPlumIO will raise ``ValueError`` if value is not within the
49
- acceptable range.
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
- Binary Parameters
62
- -----------------
71
+ Switches
72
+ ^^^^^^^^
63
73
 
64
- For binary parameters, you can also use boolean `True` or `False`,
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.BinaryParameter.turn_on
69
- .. autofunction:: pyplumio.helpers.parameter.BinaryParameter.turn_on_nowait
70
- .. autofunction:: pyplumio.helpers.parameter.BinaryParameter.turn_off
71
- .. autofunction:: pyplumio.helpers.parameter.BinaryParameter.turn_off_nowait
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 parameter is "ecomax_control" that allows you to switch
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 there's,
91
- handy shortcut built-in the controller object itself.
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
 
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.5.22'
16
- __version_tuple__ = version_tuple = (0, 5, 22)
15
+ __version__ = version = '0.5.23'
16
+ __version_tuple__ = version_tuple = (0, 5, 23)
@@ -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: MutableMapping[str, Any]
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["on"] | Literal["off"]
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["on"] | Literal["off"]
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
- EcomaxBinaryParameter,
35
- EcomaxBinaryParameterDescription,
36
- EcomaxParameter,
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
- ScheduleBinaryParameter,
51
- ScheduleBinaryParameterDescription,
52
- ScheduleParameter,
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
- EcomaxBinaryParameter
213
- if isinstance(description, EcomaxBinaryParameterDescription)
214
- else EcomaxParameter
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
- ScheduleBinaryParameter
329
- if isinstance(description, ScheduleBinaryParameterDescription)
330
- else ScheduleParameter
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
- EcomaxBinaryParameter.create_or_update(
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
- ) -> EcomaxParameter | None:
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 EcomaxParameter(
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: EcomaxBinaryParameter = self.data[ATTR_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: EcomaxBinaryParameter = self.data[ATTR_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
- MixerBinaryParameter,
16
- MixerBinaryParameterDescription,
17
- MixerParameter,
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
- MixerBinaryParameter
82
- if isinstance(description, MixerBinaryParameterDescription)
83
- else MixerParameter
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
- ThermostatBinaryParameter,
15
- ThermostatBinaryParameterDescription,
16
- ThermostatParameter,
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
- ThermostatBinaryParameter
61
- if isinstance(description, ThermostatBinaryParameterDescription)
62
- else ThermostatParameter
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, Any]
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) -> Any:
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) -> Any:
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: Any) -> None:
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: Any) -> None:
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, Any]) -> None:
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, Any]) -> None:
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