PyPlumIO 0.5.24__tar.gz → 0.5.25__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.24 → pyplumio-0.5.25}/PKG-INFO +1 -1
- {pyplumio-0.5.24 → pyplumio-0.5.25}/PyPlumIO.egg-info/PKG-INFO +1 -1
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/_version.py +2 -2
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/helpers/data_types.py +1 -1
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/helpers/parameter.py +7 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/helpers/test_data_types.py +6 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/.gitattributes +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/.github/CODE_OF_CONDUCT.md +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/.github/dependabot.yml +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/.github/workflows/ci.yml +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/.github/workflows/codeql-analysis.yml +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/.github/workflows/deploy.yml +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/.github/workflows/documentation.yml +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/.gitignore +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/.pre-commit-config.yaml +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/.vscode/settings.json +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/LICENSE +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/MANIFEST.in +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/PyPlumIO.egg-info/SOURCES.txt +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/PyPlumIO.egg-info/dependency_links.txt +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/PyPlumIO.egg-info/requires.txt +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/PyPlumIO.egg-info/top_level.txt +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/README.md +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/docs/Makefile +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/docs/make.bat +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/docs/source/callbacks.rst +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/docs/source/conf.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/docs/source/connecting.rst +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/docs/source/frames.rst +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/docs/source/index.rst +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/docs/source/mixers_thermostats.rst +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/docs/source/protocol.rst +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/docs/source/reading.rst +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/docs/source/schedules.rst +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/docs/source/writing.rst +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/images/ecomax.png +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/images/rs485.png +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/__init__.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/__main__.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/connection.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/const.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/devices/__init__.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/devices/ecomax.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/devices/ecoster.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/devices/mixer.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/devices/thermostat.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/exceptions.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/filters.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/frames/__init__.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/frames/messages.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/frames/requests.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/frames/responses.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/helpers/__init__.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/helpers/event_manager.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/helpers/factory.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/helpers/schedule.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/helpers/task_manager.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/helpers/timeout.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/helpers/uid.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/protocol.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/py.typed +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/stream.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/structures/__init__.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/structures/alerts.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/structures/boiler_load.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/structures/boiler_power.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/structures/ecomax_parameters.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/structures/fan_power.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/structures/frame_versions.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/structures/fuel_consumption.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/structures/fuel_level.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/structures/lambda_sensor.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/structures/mixer_parameters.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/structures/mixer_sensors.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/structures/modules.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/structures/network_info.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/structures/output_flags.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/structures/outputs.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/structures/pending_alerts.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/structures/product_info.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/structures/program_version.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/structures/regulator_data.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/structures/regulator_data_schema.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/structures/schedules.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/structures/statuses.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/structures/temperatures.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/structures/thermostat_parameters.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/structures/thermostat_sensors.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyplumio/utils.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/pyproject.toml +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/requirements.txt +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/requirements_docs.txt +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/requirements_test.txt +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/setup.cfg +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/__init__.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/conftest.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/frames/test_init.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/frames/test_messages.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/frames/test_requests.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/frames/test_responses.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/helpers/__init__.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/helpers/test_event_manager.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/helpers/test_factory.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/helpers/test_parameter.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/helpers/test_schedule.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/helpers/test_task_manager.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/helpers/test_timeout.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/helpers/test_uid.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/ruff.toml +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/test_connection.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/test_devices.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/test_filters.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/test_init.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/test_main.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/test_protocol.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/test_stream.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/test_utils.py +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/testdata/messages/regulator_data.json +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/testdata/messages/sensor_data.json +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/testdata/requests/alerts.json +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/testdata/requests/ecomax_control.json +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/testdata/requests/ecomax_parameters.json +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/testdata/requests/mixer_parameters.json +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/testdata/requests/set_ecomax_parameter.json +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/testdata/requests/set_mixer_parameter.json +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/testdata/requests/set_schedule.json +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/testdata/requests/set_thermostat_parameter.json +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/testdata/requests/thermostat_parameters.json +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/testdata/responses/alerts.json +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/testdata/responses/device_available.json +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/testdata/responses/ecomax_parameters.json +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/testdata/responses/mixer_parameters.json +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/testdata/responses/password.json +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/testdata/responses/program_version.json +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/testdata/responses/regulator_data_schema.json +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/testdata/responses/schedules.json +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/testdata/responses/thermostat_parameters.json +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/testdata/responses/uid.json +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/testdata/unknown/unknown_ecomax_parameter.json +0 -0
- {pyplumio-0.5.24 → pyplumio-0.5.25}/tests/testdata/unknown/unknown_mixer_parameter.json +0 -0
@@ -181,7 +181,7 @@ class String(DataType):
|
|
181
181
|
|
182
182
|
def unpack(self, data: bytes) -> None:
|
183
183
|
"""Unpack the data."""
|
184
|
-
self._value = data.split(b"\0", 1)[0].decode()
|
184
|
+
self._value = data.split(b"\0", 1)[0].decode("utf-8", "replace")
|
185
185
|
self._size = len(self.value) + 1
|
186
186
|
|
187
187
|
|
@@ -170,6 +170,13 @@ class Parameter(ABC):
|
|
170
170
|
"""Compare if parameter value is less that other."""
|
171
171
|
return self._call_relational_method("__lt__", other)
|
172
172
|
|
173
|
+
def __copy__(self) -> Parameter:
|
174
|
+
"""Create a copy of parameter."""
|
175
|
+
values = type(self.values)(
|
176
|
+
self.values.value, self.values.min_value, self.values.max_value
|
177
|
+
)
|
178
|
+
return type(self)(self.device, self.description, values)
|
179
|
+
|
173
180
|
async def set(self, value: Any, retries: int = SET_RETRIES) -> bool:
|
174
181
|
"""Set a parameter value."""
|
175
182
|
if (value := _normalize_parameter_value(value)) == self.values.value:
|
@@ -229,6 +229,12 @@ def test_string() -> None:
|
|
229
229
|
assert data_type == data_types.String.from_bytes(buffer)
|
230
230
|
assert data_type == "test"
|
231
231
|
|
232
|
+
# Test with unknown unicode char.
|
233
|
+
buffer = b"test\xd8\x00"
|
234
|
+
data_type = data_types.String.from_bytes(buffer)
|
235
|
+
assert data_type.value == "test�"
|
236
|
+
assert data_type.size == 6
|
237
|
+
|
232
238
|
|
233
239
|
def test_var_bytes() -> None:
|
234
240
|
"""Test a variable bytes data type."""
|
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
|
File without changes
|
File without changes
|