Send a result for the ZHA reconfigure websocket subscription (#184812)

This commit is contained in:
Franck Nijhof
2026-10-08 11:57:29 +02:00
committed by GitHub
parent a021b1f4d8
commit cb9695cbed
2 changed files with 7 additions and 2 deletions
@@ -514,6 +514,7 @@ async def websocket_reconfigure_node(
remove_dispatcher_function()
connection.subscriptions[msg["id"]] = async_cleanup
connection.send_result(msg[ID])
_LOGGER.debug("Re-interview node with ieee_address: %s", ieee)
hass.async_create_task(zha_gateway.async_reinterview_device(ieee))
+6 -2
View File
@@ -1280,7 +1280,7 @@ async def test_websocket_reconfigure(
messages = []
while len(messages) != 3:
while len(messages) != 4:
msg = await zha_client.receive_json()
if msg[ID] == 6:
@@ -1289,8 +1289,12 @@ async def test_websocket_reconfigure(
# Ensure the gateway re-interview was triggered with the correct IEEE
assert reinterview_mock.mock_calls == [call(zha_device_proxy.device.ieee)]
# Ensure the subscription is confirmed, so the frontend can unsubscribe
assert messages[0]["type"] == "result"
assert messages[0]["success"]
# Ensure the frontend receives progress events
assert {m["event"]["type"] for m in messages} == {
assert {m["event"]["type"] for m in messages[1:]} == {
"zha_channel_configure_reporting",
"zha_channel_bind",
"zha_channel_cfg_done",