PyPlumIO 0.5.34__tar.gz → 0.5.35__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.34 → pyplumio-0.5.35}/PKG-INFO +1 -1
- {pyplumio-0.5.34 → pyplumio-0.5.35}/PyPlumIO.egg-info/PKG-INFO +1 -1
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/_version.py +2 -2
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/devices/__init__.py +5 -4
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/exceptions.py +4 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/helpers/parameter.py +1 -1
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/helpers/test_parameter.py +8 -2
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/test_devices.py +3 -3
- {pyplumio-0.5.34 → pyplumio-0.5.35}/.gitattributes +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/.github/CODE_OF_CONDUCT.md +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/.github/dependabot.yml +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/.github/workflows/ci.yml +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/.github/workflows/codeql-analysis.yml +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/.github/workflows/deploy.yml +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/.github/workflows/documentation.yml +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/.gitignore +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/.pre-commit-config.yaml +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/.vscode/settings.json +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/LICENSE +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/MANIFEST.in +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/PyPlumIO.egg-info/SOURCES.txt +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/PyPlumIO.egg-info/dependency_links.txt +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/PyPlumIO.egg-info/requires.txt +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/PyPlumIO.egg-info/top_level.txt +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/README.md +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/docs/Makefile +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/docs/make.bat +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/docs/source/callbacks.rst +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/docs/source/conf.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/docs/source/connecting.rst +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/docs/source/frames.rst +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/docs/source/index.rst +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/docs/source/mixers_thermostats.rst +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/docs/source/protocol.rst +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/docs/source/reading.rst +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/docs/source/schedules.rst +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/docs/source/writing.rst +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/images/ecomax.png +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/images/rs485.png +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/__init__.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/__main__.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/connection.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/const.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/devices/ecomax.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/devices/ecoster.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/devices/mixer.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/devices/thermostat.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/filters.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/frames/__init__.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/frames/messages.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/frames/requests.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/frames/responses.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/helpers/__init__.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/helpers/data_types.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/helpers/event_manager.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/helpers/factory.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/helpers/schedule.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/helpers/task_manager.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/helpers/timeout.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/helpers/uid.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/protocol.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/py.typed +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/stream.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/structures/__init__.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/structures/alerts.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/structures/boiler_load.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/structures/boiler_power.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/structures/ecomax_parameters.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/structures/fan_power.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/structures/frame_versions.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/structures/fuel_consumption.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/structures/fuel_level.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/structures/lambda_sensor.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/structures/mixer_parameters.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/structures/mixer_sensors.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/structures/modules.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/structures/network_info.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/structures/output_flags.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/structures/outputs.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/structures/pending_alerts.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/structures/product_info.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/structures/program_version.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/structures/regulator_data.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/structures/regulator_data_schema.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/structures/schedules.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/structures/statuses.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/structures/temperatures.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/structures/thermostat_parameters.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/structures/thermostat_sensors.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyplumio/utils.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/pyproject.toml +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/requirements.txt +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/requirements_docs.txt +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/requirements_test.txt +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/setup.cfg +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/__init__.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/conftest.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/frames/test_init.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/frames/test_messages.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/frames/test_requests.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/frames/test_responses.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/helpers/__init__.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/helpers/test_data_types.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/helpers/test_event_manager.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/helpers/test_factory.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/helpers/test_schedule.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/helpers/test_task_manager.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/helpers/test_timeout.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/helpers/test_uid.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/ruff.toml +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/test_connection.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/test_filters.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/test_init.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/test_main.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/test_protocol.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/test_stream.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/test_utils.py +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/testdata/messages/regulator_data.json +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/testdata/messages/sensor_data.json +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/testdata/requests/alerts.json +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/testdata/requests/ecomax_control.json +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/testdata/requests/ecomax_parameters.json +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/testdata/requests/mixer_parameters.json +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/testdata/requests/set_ecomax_parameter.json +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/testdata/requests/set_mixer_parameter.json +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/testdata/requests/set_schedule.json +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/testdata/requests/set_thermostat_parameter.json +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/testdata/requests/thermostat_parameters.json +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/testdata/responses/alerts.json +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/testdata/responses/device_available.json +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/testdata/responses/ecomax_parameters.json +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/testdata/responses/mixer_parameters.json +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/testdata/responses/password.json +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/testdata/responses/program_version.json +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/testdata/responses/regulator_data_schema.json +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/testdata/responses/schedules.json +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/testdata/responses/thermostat_parameters.json +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/testdata/responses/uid.json +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/testdata/unknown/unknown_ecomax_parameter.json +0 -0
- {pyplumio-0.5.34 → pyplumio-0.5.35}/tests/testdata/unknown/unknown_mixer_parameter.json +0 -0
@@ -9,7 +9,7 @@ import logging
|
|
9
9
|
from typing import Any, ClassVar
|
10
10
|
|
11
11
|
from pyplumio.const import ATTR_FRAME_ERRORS, ATTR_LOADED, DeviceType, FrameType
|
12
|
-
from pyplumio.exceptions import UnknownDeviceError
|
12
|
+
from pyplumio.exceptions import RequestError, UnknownDeviceError
|
13
13
|
from pyplumio.frames import DataFrameDescription, Frame, Request, is_known_frame_type
|
14
14
|
from pyplumio.helpers.event_manager import EventManager
|
15
15
|
from pyplumio.helpers.factory import create_instance
|
@@ -180,7 +180,7 @@ class PhysicalDevice(Device, ABC):
|
|
180
180
|
)
|
181
181
|
|
182
182
|
errors = [
|
183
|
-
result.args[1] for result in results if isinstance(result,
|
183
|
+
result.args[1] for result in results if isinstance(result, RequestError)
|
184
184
|
]
|
185
185
|
|
186
186
|
await asyncio.gather(
|
@@ -203,9 +203,10 @@ class PhysicalDevice(Device, ABC):
|
|
203
203
|
except asyncio.TimeoutError:
|
204
204
|
retries -= 1
|
205
205
|
|
206
|
-
raise
|
206
|
+
raise RequestError(
|
207
207
|
f"Failed to request parameter '{name}' with frame type '{frame_type}' "
|
208
|
-
f"after {retries} retries."
|
208
|
+
f"after {retries} retries.",
|
209
|
+
frame_type,
|
209
210
|
)
|
210
211
|
|
211
212
|
@classmethod
|
@@ -217,7 +217,7 @@ class Parameter(ABC):
|
|
217
217
|
while self.pending_update:
|
218
218
|
if retries <= 0:
|
219
219
|
_LOGGER.warning(
|
220
|
-
"
|
220
|
+
"Unable to confirm that parameter '%s' was set after %d retries",
|
221
221
|
self.description.name,
|
222
222
|
retries,
|
223
223
|
)
|
@@ -268,7 +268,10 @@ async def test_number_request_with_unchanged_value(
|
|
268
268
|
assert number.pending_update
|
269
269
|
assert mock_put.await_count == 3 # type: ignore [unreachable]
|
270
270
|
mock_put.reset_mock()
|
271
|
-
assert
|
271
|
+
assert (
|
272
|
+
"Unable to confirm that parameter 'test_number' was set after 0 retries"
|
273
|
+
in caplog.text
|
274
|
+
)
|
272
275
|
await number.set(5)
|
273
276
|
mock_put.assert_not_awaited()
|
274
277
|
|
@@ -283,7 +286,10 @@ async def test_switch_request_with_unchanged_value(
|
|
283
286
|
assert switch.pending_update
|
284
287
|
assert mock_put.await_count == 3 # type: ignore [unreachable]
|
285
288
|
mock_put.reset_mock()
|
286
|
-
assert
|
289
|
+
assert (
|
290
|
+
"Unable to confirm that parameter 'test_switch' was set after 0 retries"
|
291
|
+
in caplog.text
|
292
|
+
)
|
287
293
|
await switch.set(True)
|
288
294
|
mock_put.assert_not_awaited()
|
289
295
|
|
@@ -36,7 +36,7 @@ from pyplumio.devices.ecomax import (
|
|
36
36
|
from pyplumio.devices.ecoster import EcoSTER
|
37
37
|
from pyplumio.devices.mixer import Mixer
|
38
38
|
from pyplumio.devices.thermostat import Thermostat
|
39
|
-
from pyplumio.exceptions import UnknownDeviceError
|
39
|
+
from pyplumio.exceptions import RequestError, UnknownDeviceError
|
40
40
|
from pyplumio.frames import Response
|
41
41
|
from pyplumio.frames.messages import RegulatorDataMessage, SensorDataMessage
|
42
42
|
from pyplumio.frames.requests import (
|
@@ -144,7 +144,7 @@ async def test_async_setup_error() -> None:
|
|
144
144
|
patch(
|
145
145
|
"pyplumio.devices.ecomax.EcoMAX.request",
|
146
146
|
side_effect=(
|
147
|
-
|
147
|
+
RequestError("test", FrameType.REQUEST_ALERTS),
|
148
148
|
True,
|
149
149
|
True,
|
150
150
|
True,
|
@@ -597,7 +597,7 @@ async def test_request_error(ecomax: EcoMAX) -> None:
|
|
597
597
|
"pyplumio.devices.ecomax.EcoMAX.get",
|
598
598
|
side_effect=(asyncio.TimeoutError, asyncio.TimeoutError),
|
599
599
|
),
|
600
|
-
pytest.raises(
|
600
|
+
pytest.raises(RequestError),
|
601
601
|
):
|
602
602
|
await ecomax.request("foo", FrameType.REQUEST_ALERTS, retries=1)
|
603
603
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|