Remove system info from deCONZ diagnostics (#64704)
This commit is contained in:
parent
d5211c12b0
commit
84b483673e
2 changed files with 25 additions and 36 deletions
|
@ -5,7 +5,6 @@ from typing import Any
|
|||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.system_info import async_get_system_info
|
||||
|
||||
from .gateway import get_gateway_from_config_entry
|
||||
|
||||
|
@ -17,7 +16,6 @@ async def async_get_config_entry_diagnostics(
|
|||
gateway = get_gateway_from_config_entry(hass, config_entry)
|
||||
diag: dict[str, Any] = {}
|
||||
|
||||
diag["home_assistant"] = await async_get_system_info(hass)
|
||||
diag["config_entry"] = dict(config_entry.data)
|
||||
diag["deconz_config"] = gateway.api.config.raw
|
||||
diag["websocket_state"] = gateway.api.websocket.state
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
"""Test deCONZ diagnostics."""
|
||||
|
||||
from unittest.mock import patch
|
||||
|
||||
from pydeconz.websocket import STATE_RUNNING
|
||||
|
||||
from homeassistant.const import Platform
|
||||
|
@ -20,35 +18,28 @@ async def test_entry_diagnostics(
|
|||
await mock_deconz_websocket(state=STATE_RUNNING)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
with patch(
|
||||
"homeassistant.helpers.system_info.async_get_system_info",
|
||||
return_value={"get_system_info": "fake data"},
|
||||
):
|
||||
assert await get_diagnostics_for_config_entry(
|
||||
hass, hass_client, config_entry
|
||||
) == {
|
||||
"home_assistant": {"get_system_info": "fake data"},
|
||||
"config_entry": dict(config_entry.data),
|
||||
"deconz_config": DECONZ_CONFIG,
|
||||
"websocket_state": STATE_RUNNING,
|
||||
"deconz_ids": {},
|
||||
"entities": {
|
||||
str(Platform.ALARM_CONTROL_PANEL): [],
|
||||
str(Platform.BINARY_SENSOR): [],
|
||||
str(Platform.CLIMATE): [],
|
||||
str(Platform.COVER): [],
|
||||
str(Platform.FAN): [],
|
||||
str(Platform.LIGHT): [],
|
||||
str(Platform.LOCK): [],
|
||||
str(Platform.NUMBER): [],
|
||||
str(Platform.SENSOR): [],
|
||||
str(Platform.SIREN): [],
|
||||
str(Platform.SWITCH): [],
|
||||
},
|
||||
"events": {},
|
||||
"alarm_systems": {},
|
||||
"groups": {},
|
||||
"lights": {},
|
||||
"scenes": {},
|
||||
"sensors": {},
|
||||
}
|
||||
assert await get_diagnostics_for_config_entry(hass, hass_client, config_entry) == {
|
||||
"config_entry": dict(config_entry.data),
|
||||
"deconz_config": DECONZ_CONFIG,
|
||||
"websocket_state": STATE_RUNNING,
|
||||
"deconz_ids": {},
|
||||
"entities": {
|
||||
str(Platform.ALARM_CONTROL_PANEL): [],
|
||||
str(Platform.BINARY_SENSOR): [],
|
||||
str(Platform.CLIMATE): [],
|
||||
str(Platform.COVER): [],
|
||||
str(Platform.FAN): [],
|
||||
str(Platform.LIGHT): [],
|
||||
str(Platform.LOCK): [],
|
||||
str(Platform.NUMBER): [],
|
||||
str(Platform.SENSOR): [],
|
||||
str(Platform.SIREN): [],
|
||||
str(Platform.SWITCH): [],
|
||||
},
|
||||
"events": {},
|
||||
"alarm_systems": {},
|
||||
"groups": {},
|
||||
"lights": {},
|
||||
"scenes": {},
|
||||
"sensors": {},
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue