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:
Chris 2020-08-01 12:50:04 -07:00 committed by GitHub
parent af97141f4f
commit 607ba08e23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -76,6 +76,7 @@ class ZWaveWebsocketApi:
"node_basic_string": node.node_basic_string,
"node_generic_string": node.node_generic_string,
"node_specific_string": node.node_specific_string,
"neighbors": node.neighbors,
OZW_INSTANCE: msg[OZW_INSTANCE],
},
)

View File

@ -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_generic_string"] == "Binary Switch"
assert result["node_specific_string"] == "Binary Power Switch"
assert result["neighbors"] == [1, 33, 36, 37, 39]
# Test node statistics
await client.send_json({ID: 7, TYPE: "ozw/node_statistics", NODE_ID: 39})