Add node neighbors to ozw websocket api (#38447)
* Add node neighbors to websocket api * Update homeassistant/components/ozw/websocket_api.py Co-authored-by: Charles Garwood <cgarwood@newdealmultimedia.com> * Update tests/components/ozw/test_websocket_api.py Co-authored-by: Charles Garwood <cgarwood@newdealmultimedia.com> Co-authored-by: Charles Garwood <cgarwood@newdealmultimedia.com>
This commit is contained in:
1 parent
af97141f4f
commit
607ba08e23
2 files changed
+2
No files matched your search
@@ -76,6 +76,7 @@ class ZWaveWebsocketApi:
|
|||||||
"node_basic_string": node.node_basic_string,
|
"node_basic_string": node.node_basic_string,
|
||||||
"node_generic_string": node.node_generic_string,
|
"node_generic_string": node.node_generic_string,
|
||||||
"node_specific_string": node.node_specific_string,
|
"node_specific_string": node.node_specific_string,
|
||||||
|
"neighbors": node.neighbors,
|
||||||
OZW_INSTANCE: msg[OZW_INSTANCE],
|
OZW_INSTANCE: msg[OZW_INSTANCE],
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ async def test_websocket_api(hass, generic_data, hass_ws_client):
|
|||||||
assert result["node_basic_string"] == "Routing Slave"
|
assert result["node_basic_string"] == "Routing Slave"
|
||||||
assert result["node_generic_string"] == "Binary Switch"
|
assert result["node_generic_string"] == "Binary Switch"
|
||||||
assert result["node_specific_string"] == "Binary Power Switch"
|
assert result["node_specific_string"] == "Binary Power Switch"
|
||||||
|
assert result["neighbors"] == [1, 33, 36, 37, 39]
|
||||||
|
|
||||||
# Test node statistics
|
# Test node statistics
|
||||||
await client.send_json({ID: 7, TYPE: "ozw/node_statistics", NODE_ID: 39})
|
await client.send_json({ID: 7, TYPE: "ozw/node_statistics", NODE_ID: 39})
|
||||||
|
|||||||
Reference in new issue
Block a user