mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 17:27:52 +00:00
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:
parent
af97141f4f
commit
607ba08e23
@ -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],
|
||||
},
|
||||
)
|
||||
|
@ -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})
|
||||
|
Loading…
x
Reference in New Issue
Block a user