mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 02:37:08 +00:00
Adjust zwave_js diagnostics (#85524)
This commit is contained in:
parent
72c9ca2567
commit
aa5b29c560
@ -106,7 +106,7 @@ def get_device_entities(
|
|||||||
|
|
||||||
async def async_get_config_entry_diagnostics(
|
async def async_get_config_entry_diagnostics(
|
||||||
hass: HomeAssistant, config_entry: ConfigEntry
|
hass: HomeAssistant, config_entry: ConfigEntry
|
||||||
) -> list[dict]:
|
) -> dict[str, Any]:
|
||||||
"""Return diagnostics for a config entry."""
|
"""Return diagnostics for a config entry."""
|
||||||
msgs: list[dict] = async_redact_data(
|
msgs: list[dict] = async_redact_data(
|
||||||
await dump_msgs(
|
await dump_msgs(
|
||||||
@ -119,12 +119,12 @@ async def async_get_config_entry_diagnostics(
|
|||||||
network_state["result"]["state"]["nodes"] = [
|
network_state["result"]["state"]["nodes"] = [
|
||||||
redact_node_state(node) for node in network_state["result"]["state"]["nodes"]
|
redact_node_state(node) for node in network_state["result"]["state"]["nodes"]
|
||||||
]
|
]
|
||||||
return [*handshake_msgs, network_state]
|
return {"messages": [*handshake_msgs, network_state]}
|
||||||
|
|
||||||
|
|
||||||
async def async_get_device_diagnostics(
|
async def async_get_device_diagnostics(
|
||||||
hass: HomeAssistant, config_entry: ConfigEntry, device: dr.DeviceEntry
|
hass: HomeAssistant, config_entry: ConfigEntry, device: dr.DeviceEntry
|
||||||
) -> dict:
|
) -> dict[str, Any]:
|
||||||
"""Return diagnostics for a device."""
|
"""Return diagnostics for a device."""
|
||||||
client: Client = hass.data[DOMAIN][config_entry.entry_id][DATA_CLIENT]
|
client: Client = hass.data[DOMAIN][config_entry.entry_id][DATA_CLIENT]
|
||||||
identifiers = get_home_and_node_id_from_device_entry(device)
|
identifiers = get_home_and_node_id_from_device_entry(device)
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user