Bump zwave-js-server-python to 0.51.0 (#99250)
* Bump zwave-js-server-python to 0.51.0 * Fix how we patch the commandpull/99254/head
parent
cdf39ec365
commit
be126da72d
|
@ -1730,7 +1730,7 @@ async def websocket_subscribe_log_updates(
|
|||
@callback
|
||||
def async_cleanup() -> None:
|
||||
"""Remove signal listeners."""
|
||||
hass.async_create_task(driver.async_stop_listening_logs())
|
||||
hass.async_create_task(client.async_stop_listening_logs())
|
||||
for unsub in unsubs:
|
||||
unsub()
|
||||
|
||||
|
@ -1771,7 +1771,7 @@ async def websocket_subscribe_log_updates(
|
|||
]
|
||||
connection.subscriptions[msg["id"]] = async_cleanup
|
||||
|
||||
await driver.async_start_listening_logs()
|
||||
await client.async_start_listening_logs()
|
||||
connection.send_result(msg[ID])
|
||||
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"iot_class": "local_push",
|
||||
"loggers": ["zwave_js_server"],
|
||||
"quality_scale": "platinum",
|
||||
"requirements": ["pyserial==3.5", "zwave-js-server-python==0.50.1"],
|
||||
"requirements": ["pyserial==3.5", "zwave-js-server-python==0.51.0"],
|
||||
"usb": [
|
||||
{
|
||||
"vid": "0658",
|
||||
|
|
|
@ -2796,7 +2796,7 @@ zigpy==0.56.4
|
|||
zm-py==0.5.2
|
||||
|
||||
# homeassistant.components.zwave_js
|
||||
zwave-js-server-python==0.50.1
|
||||
zwave-js-server-python==0.51.0
|
||||
|
||||
# homeassistant.components.zwave_me
|
||||
zwave-me-ws==0.4.3
|
||||
|
|
|
@ -2057,7 +2057,7 @@ zigpy-znp==0.11.4
|
|||
zigpy==0.56.4
|
||||
|
||||
# homeassistant.components.zwave_js
|
||||
zwave-js-server-python==0.50.1
|
||||
zwave-js-server-python==0.51.0
|
||||
|
||||
# homeassistant.components.zwave_me
|
||||
zwave-me-ws==0.4.3
|
||||
|
|
|
@ -3298,22 +3298,21 @@ async def test_subscribe_log_updates(
|
|||
}
|
||||
|
||||
# Test FailedZWaveCommand is caught
|
||||
with patch(
|
||||
"zwave_js_server.model.driver.Driver.async_start_listening_logs",
|
||||
side_effect=FailedZWaveCommand("failed_command", 1, "error message"),
|
||||
):
|
||||
await ws_client.send_json(
|
||||
{
|
||||
ID: 2,
|
||||
TYPE: "zwave_js/subscribe_log_updates",
|
||||
ENTRY_ID: entry.entry_id,
|
||||
}
|
||||
)
|
||||
msg = await ws_client.receive_json()
|
||||
client.async_start_listening_logs.side_effect = FailedZWaveCommand(
|
||||
"failed_command", 1, "error message"
|
||||
)
|
||||
await ws_client.send_json(
|
||||
{
|
||||
ID: 2,
|
||||
TYPE: "zwave_js/subscribe_log_updates",
|
||||
ENTRY_ID: entry.entry_id,
|
||||
}
|
||||
)
|
||||
msg = await ws_client.receive_json()
|
||||
|
||||
assert not msg["success"]
|
||||
assert msg["error"]["code"] == "zwave_error"
|
||||
assert msg["error"]["message"] == "Z-Wave error 1: error message"
|
||||
assert not msg["success"]
|
||||
assert msg["error"]["code"] == "zwave_error"
|
||||
assert msg["error"]["message"] == "Z-Wave error 1: error message"
|
||||
|
||||
# Test sending command with not loaded entry fails
|
||||
await hass.config_entries.async_unload(entry.entry_id)
|
||||
|
|
Loading…
Reference in New Issue