Remove system info from deCONZ diagnostics (#64704)

This commit is contained in:
Robert Svensson 2022-01-23 07:43:07 +01:00 committed by GitHub
parent d5211c12b0
commit 84b483673e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 36 deletions

View file

@ -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

View file

@ -1,7 +1,5 @@
"""Test deCONZ diagnostics."""
from unittest.mock import patch
from pydeconz.websocket import STATE_RUNNING
from homeassistant.const import Platform
@ -20,14 +18,7 @@ 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"},
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,