Add websocket command to get a list of OZW instances and their status (#39019)
* Add websocket command to get a list of OZW instances and their status * Add test * Review comments
This commit is contained in:
parent
3dc79aa60a
commit
96035ccd6f
2 changed files with 24 additions and 0 deletions
|
@ -12,6 +12,15 @@ async def test_websocket_api(hass, generic_data, hass_ws_client):
|
|||
await setup_ozw(hass, fixture=generic_data)
|
||||
client = await hass_ws_client(hass)
|
||||
|
||||
# Test instance list
|
||||
await client.send_json({ID: 4, TYPE: "ozw/get_instances"})
|
||||
msg = await client.receive_json()
|
||||
assert len(msg["result"]) == 1
|
||||
result = msg["result"][0]
|
||||
assert result["id"] == 1
|
||||
assert result["Status"] == "driverAllNodesQueried"
|
||||
assert result["OpenZWave_Version"] == "1.6.1008"
|
||||
|
||||
# Test network status
|
||||
await client.send_json({ID: 5, TYPE: "ozw/network_status"})
|
||||
msg = await client.receive_json()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue