Add OZW network_statistics websocket command (#39124)

* Add network_statistics websocket command

* Add tests
This commit is contained in:
Charles Garwood authored and GitHub committed 2020-08-21 22:52:03 +02:00
1 parent a9ffc149f8
commit 993088d26e
3 files changed
+31 -1

No files matched your search

@@ -74,6 +74,14 @@ async def test_websocket_api(hass, generic_data, hass_ws_client):
result = msg["result"]
assert result["metadata"]["ProductPic"] == "images/aeotec/zwa002.png"
# Test network statistics
await client.send_json({ID: 9, TYPE: "ozw/network_statistics"})
msg = await client.receive_json()
result = msg["result"]
assert result["readCnt"] == 92220
assert result[OZW_INSTANCE] == 1
assert result["node_count"] == 5
async def test_refresh_node(hass, generic_data, sent_messages, hass_ws_client):
"""Test the ozw refresh node api."""