pypck 0.9.5__tar.gz → 0.9.6__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.
- {pypck-0.9.5/pypck.egg-info → pypck-0.9.6}/PKG-INFO +1 -1
- pypck-0.9.6/VERSION +1 -0
- {pypck-0.9.5 → pypck-0.9.6}/pypck/device.py +4 -1
- {pypck-0.9.5 → pypck-0.9.6/pypck.egg-info}/PKG-INFO +1 -1
- {pypck-0.9.5 → pypck-0.9.6}/tests/test_module.py +10 -5
- pypck-0.9.5/VERSION +0 -1
- {pypck-0.9.5 → pypck-0.9.6}/LICENSE +0 -0
- {pypck-0.9.5 → pypck-0.9.6}/README.md +0 -0
- {pypck-0.9.5 → pypck-0.9.6}/pypck/__init__.py +0 -0
- {pypck-0.9.5 → pypck-0.9.6}/pypck/connection.py +0 -0
- {pypck-0.9.5 → pypck-0.9.6}/pypck/helpers.py +0 -0
- {pypck-0.9.5 → pypck-0.9.6}/pypck/inputs.py +0 -0
- {pypck-0.9.5 → pypck-0.9.6}/pypck/lcn_addr.py +0 -0
- {pypck-0.9.5 → pypck-0.9.6}/pypck/lcn_defs.py +0 -0
- {pypck-0.9.5 → pypck-0.9.6}/pypck/pck_commands.py +0 -0
- {pypck-0.9.5 → pypck-0.9.6}/pypck/py.typed +0 -0
- {pypck-0.9.5 → pypck-0.9.6}/pypck/status_requester.py +0 -0
- {pypck-0.9.5 → pypck-0.9.6}/pypck.egg-info/SOURCES.txt +0 -0
- {pypck-0.9.5 → pypck-0.9.6}/pypck.egg-info/dependency_links.txt +0 -0
- {pypck-0.9.5 → pypck-0.9.6}/pypck.egg-info/not-zip-safe +0 -0
- {pypck-0.9.5 → pypck-0.9.6}/pypck.egg-info/top_level.txt +0 -0
- {pypck-0.9.5 → pypck-0.9.6}/pyproject.toml +0 -0
- {pypck-0.9.5 → pypck-0.9.6}/setup.cfg +0 -0
- {pypck-0.9.5 → pypck-0.9.6}/tests/test_commands.py +0 -0
- {pypck-0.9.5 → pypck-0.9.6}/tests/test_connection.py +0 -0
- {pypck-0.9.5 → pypck-0.9.6}/tests/test_dyn_text.py +0 -0
- {pypck-0.9.5 → pypck-0.9.6}/tests/test_input.py +0 -0
- {pypck-0.9.5 → pypck-0.9.6}/tests/test_messages.py +0 -0
- {pypck-0.9.5 → pypck-0.9.6}/tests/test_status_requester.py +0 -0
- {pypck-0.9.5 → pypck-0.9.6}/tests/test_vars.py +0 -0
pypck-0.9.6/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.9.6
|
|
@@ -911,6 +911,9 @@ class DeviceConnection:
|
|
|
911
911
|
# (variable response is typeless)
|
|
912
912
|
if self.serials.software_serial < 0x170206:
|
|
913
913
|
max_age = 0
|
|
914
|
+
variable_response = lcn_defs.Var.UNKNOWN
|
|
915
|
+
else:
|
|
916
|
+
variable_response = variable
|
|
914
917
|
|
|
915
918
|
result = await self.status_requester.request(
|
|
916
919
|
response_type=inputs.ModStatusVar,
|
|
@@ -918,7 +921,7 @@ class DeviceConnection:
|
|
|
918
921
|
variable, self.serials.software_serial
|
|
919
922
|
),
|
|
920
923
|
max_age=max_age,
|
|
921
|
-
var=
|
|
924
|
+
var=variable_response,
|
|
922
925
|
)
|
|
923
926
|
|
|
924
927
|
result = cast(inputs.ModStatusVar, result)
|
|
@@ -140,17 +140,17 @@ async def test_request_status_binary_sensors(module10: MockDeviceConnection) ->
|
|
|
140
140
|
|
|
141
141
|
|
|
142
142
|
@pytest.mark.parametrize(
|
|
143
|
-
"variable, software_serial",
|
|
143
|
+
"variable, response_variable, software_serial",
|
|
144
144
|
[
|
|
145
145
|
*[
|
|
146
|
-
(variable, 0x170206)
|
|
146
|
+
(variable, variable, 0x170206)
|
|
147
147
|
for variable in lcn_defs.Var.variables_new()
|
|
148
148
|
+ lcn_defs.Var.set_points()
|
|
149
149
|
+ list(chain(*lcn_defs.Var.thresholds_new()))
|
|
150
150
|
+ lcn_defs.Var.s0s()
|
|
151
151
|
],
|
|
152
152
|
*[
|
|
153
|
-
(variable, 0x170000)
|
|
153
|
+
(variable, lcn_defs.Var.UNKNOWN, 0x170000)
|
|
154
154
|
for variable in lcn_defs.Var.variables_old()
|
|
155
155
|
+ lcn_defs.Var.set_points()
|
|
156
156
|
+ list(chain(*lcn_defs.Var.thresholds_old()))
|
|
@@ -158,7 +158,10 @@ async def test_request_status_binary_sensors(module10: MockDeviceConnection) ->
|
|
|
158
158
|
],
|
|
159
159
|
)
|
|
160
160
|
async def test_request_status_variable(
|
|
161
|
-
module10: MockDeviceConnection,
|
|
161
|
+
module10: MockDeviceConnection,
|
|
162
|
+
variable: lcn_defs.Var,
|
|
163
|
+
response_variable: lcn_defs.Var,
|
|
164
|
+
software_serial: int,
|
|
162
165
|
) -> None:
|
|
163
166
|
"""Test requesting the variable status of a module."""
|
|
164
167
|
module10.serials.software_serial = software_serial
|
|
@@ -166,7 +169,9 @@ async def test_request_status_variable(
|
|
|
166
169
|
|
|
167
170
|
await wait_until_called(module10.send_command)
|
|
168
171
|
await module10.async_process_input(
|
|
169
|
-
inputs.ModStatusVar(
|
|
172
|
+
inputs.ModStatusVar(
|
|
173
|
+
module10.addr, response_variable, lcn_defs.VarValue.from_native(50)
|
|
174
|
+
)
|
|
170
175
|
)
|
|
171
176
|
|
|
172
177
|
result = await request_task
|
pypck-0.9.5/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.9.5
|
|
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
|