mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 04:07:08 +00:00
Update node statistics for zwave_js device diagnostics dump (#72509)
This commit is contained in:
parent
180b5cd2bb
commit
f038d0892a
@ -155,6 +155,8 @@ async def async_get_device_diagnostics(
|
||||
node = driver.controller.nodes[node_id]
|
||||
entities = get_device_entities(hass, node, device)
|
||||
assert client.version
|
||||
node_state = redact_node_state(async_redact_data(node.data, KEYS_TO_REDACT))
|
||||
node_state["statistics"] = node.statistics.data
|
||||
return {
|
||||
"versionInfo": {
|
||||
"driverVersion": client.version.driver_version,
|
||||
@ -163,5 +165,5 @@ async def async_get_device_diagnostics(
|
||||
"maxSchemaVersion": client.version.max_schema_version,
|
||||
},
|
||||
"entities": entities,
|
||||
"state": redact_node_state(async_redact_data(node.data, KEYS_TO_REDACT)),
|
||||
"state": node_state,
|
||||
}
|
||||
|
@ -92,7 +92,16 @@ async def test_device_diagnostics(
|
||||
assert len(diagnostics_data["entities"]) == len(
|
||||
list(async_discover_node_values(multisensor_6, device, {device.id: set()}))
|
||||
)
|
||||
assert diagnostics_data["state"] == multisensor_6.data
|
||||
assert diagnostics_data["state"] == {
|
||||
**multisensor_6.data,
|
||||
"statistics": {
|
||||
"commandsDroppedRX": 0,
|
||||
"commandsDroppedTX": 0,
|
||||
"commandsRX": 0,
|
||||
"commandsTX": 0,
|
||||
"timeoutResponse": 0,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
async def test_device_diagnostics_error(hass, integration):
|
||||
|
Loading…
x
Reference in New Issue
Block a user