PyPlumIO 0.5.23__py3-none-any.whl → 0.5.25__py3-none-any.whl
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.23.dist-info → PyPlumIO-0.5.25.dist-info}/METADATA +1 -1
- {PyPlumIO-0.5.23.dist-info → PyPlumIO-0.5.25.dist-info}/RECORD +8 -8
- pyplumio/_version.py +2 -2
- pyplumio/helpers/data_types.py +1 -1
- pyplumio/helpers/parameter.py +19 -3
- {PyPlumIO-0.5.23.dist-info → PyPlumIO-0.5.25.dist-info}/LICENSE +0 -0
- {PyPlumIO-0.5.23.dist-info → PyPlumIO-0.5.25.dist-info}/WHEEL +0 -0
- {PyPlumIO-0.5.23.dist-info → PyPlumIO-0.5.25.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
pyplumio/__init__.py,sha256=ditJTIOFGJDg60atHzOpiggdUrZHpSynno7MtpZUGVk,3299
|
2
2
|
pyplumio/__main__.py,sha256=3IwHHSq-iay5FaeMc95klobe-xv82yydSKcBE7BFZ6M,500
|
3
|
-
pyplumio/_version.py,sha256=
|
3
|
+
pyplumio/_version.py,sha256=NdqvDMFnl0hh-C5MLFStVcNIuOZiaethGZ5YrUJK1Bg,413
|
4
4
|
pyplumio/connection.py,sha256=6mUbcjGxxEhMVIbzZgCqH-Ez-fcYoRj7ZbVSzpikpNA,5949
|
5
5
|
pyplumio/const.py,sha256=8rpiVbVb5R_6Rm6J2sgCnaVrkD-2Fzhd1RYMz0MBgwo,3915
|
6
6
|
pyplumio/exceptions.py,sha256=Wn-y5AJ5xfaBlHhTUVKB27_0Us8_OVHqh-sicnr9sYA,700
|
@@ -19,10 +19,10 @@ pyplumio/frames/messages.py,sha256=7vyOjcxGDnaRlyB4jPsCt00yCc3Axme8NN7uK922DS8,3
|
|
19
19
|
pyplumio/frames/requests.py,sha256=Ra8xH5oKYhkEUtadN-9ZsJKkt5xZkz5O7edQVsDhNsM,7221
|
20
20
|
pyplumio/frames/responses.py,sha256=j4awA2-MfsoPdENC4Fvae4_Oa70rDhH19ebmEoAqhh8,6532
|
21
21
|
pyplumio/helpers/__init__.py,sha256=H2xxdkF-9uADLwEbfBUoxNTdwru3L5Z2cfJjgsuRsn0,31
|
22
|
-
pyplumio/helpers/data_types.py,sha256=
|
22
|
+
pyplumio/helpers/data_types.py,sha256=ADizMys0jq_uKIJvN8KZcL41qBgkkiqy6wSBOrr8mTE,8273
|
23
23
|
pyplumio/helpers/event_manager.py,sha256=yH_VjEvIkuYwk31qb3rXtFDfKAStbA-YWWc4ED17jVI,6443
|
24
24
|
pyplumio/helpers/factory.py,sha256=eiTkYUCernUn0VNDDdEN4IyjNPrXK8vnJESXyLaqFzE,1017
|
25
|
-
pyplumio/helpers/parameter.py,sha256=
|
25
|
+
pyplumio/helpers/parameter.py,sha256=SSAzIMmx0g5VMurzT-9Ys5ZaMlNbcKxcGfbzZWreXeM,11404
|
26
26
|
pyplumio/helpers/schedule.py,sha256=-IZJ-CU4PhFlsE586wTw--ovDrTo2Hs4JneCHhc0e-Y,5013
|
27
27
|
pyplumio/helpers/task_manager.py,sha256=HAd69yGTRL0zQsu-ywnbLu1UXiJzgHWuhYWA--vs4lQ,1181
|
28
28
|
pyplumio/helpers/timeout.py,sha256=XM58yaz93cNsxW7Ok6hfBw8i_92HdsGFQVBhpqbCZ70,770
|
@@ -53,8 +53,8 @@ pyplumio/structures/statuses.py,sha256=wkoynyMRr1VREwfBC6vU48kPA8ZQ83pcXuciy2xHJ
|
|
53
53
|
pyplumio/structures/temperatures.py,sha256=1CDzehNmbALz1Jyt_9gZNIk52q6Wv-xQXjijVDCVYec,2337
|
54
54
|
pyplumio/structures/thermostat_parameters.py,sha256=ybsab49teETR8pMsSCmPidNe5IclTq8tj7uxtHXGEAY,8045
|
55
55
|
pyplumio/structures/thermostat_sensors.py,sha256=ZmjWgYtTZ5M8Lnz_Q5N4JD8G3MvEmByPFjYsy6XZOmo,3177
|
56
|
-
PyPlumIO-0.5.
|
57
|
-
PyPlumIO-0.5.
|
58
|
-
PyPlumIO-0.5.
|
59
|
-
PyPlumIO-0.5.
|
60
|
-
PyPlumIO-0.5.
|
56
|
+
PyPlumIO-0.5.25.dist-info/LICENSE,sha256=m-UuZFjXJ22uPTGm9kSHS8bqjsf5T8k2wL9bJn1Y04o,1088
|
57
|
+
PyPlumIO-0.5.25.dist-info/METADATA,sha256=Nj3fV0EWvpmH1HJQN1SOfjNl2_llPNjsUbZLkJUmkME,5490
|
58
|
+
PyPlumIO-0.5.25.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
59
|
+
PyPlumIO-0.5.25.dist-info/top_level.txt,sha256=kNBz9UPPkPD9teDn3U_sEy5LjzwLm9KfADCXtBlbw8A,9
|
60
|
+
PyPlumIO-0.5.25.dist-info/RECORD,,
|
pyplumio/_version.py
CHANGED
pyplumio/helpers/data_types.py
CHANGED
@@ -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
|
|
pyplumio/helpers/parameter.py
CHANGED
@@ -113,9 +113,18 @@ class Parameter(ABC):
|
|
113
113
|
|
114
114
|
def _call_relational_method(self, method_to_call: str, other: Any) -> Any:
|
115
115
|
"""Call a specified relational method."""
|
116
|
-
|
117
|
-
|
118
|
-
|
116
|
+
if isinstance(other, Parameter):
|
117
|
+
other = other.values
|
118
|
+
|
119
|
+
if isinstance(other, ParameterValues):
|
120
|
+
handler = getattr(self.values, method_to_call)
|
121
|
+
return handler(other)
|
122
|
+
|
123
|
+
if isinstance(other, (int, float, bool)) or other in (STATE_OFF, STATE_ON):
|
124
|
+
handler = getattr(self.values.value, method_to_call)
|
125
|
+
return handler(_normalize_parameter_value(other))
|
126
|
+
else:
|
127
|
+
return NotImplemented
|
119
128
|
|
120
129
|
def __int__(self) -> int:
|
121
130
|
"""Return an integer representation of parameter's value."""
|
@@ -161,6 +170,13 @@ class Parameter(ABC):
|
|
161
170
|
"""Compare if parameter value is less that other."""
|
162
171
|
return self._call_relational_method("__lt__", other)
|
163
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
|
+
|
164
180
|
async def set(self, value: Any, retries: int = SET_RETRIES) -> bool:
|
165
181
|
"""Set a parameter value."""
|
166
182
|
if (value := _normalize_parameter_value(value)) == self.values.value:
|
File without changes
|
File without changes
|
File without changes
|