mirror of
https://github.com/home-assistant/core.git
synced 2026-07-08 07:15:09 +01:00
d766aae436
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: frenck <195327+frenck@users.noreply.github.com>
33 lines
703 B
Python
33 lines
703 B
Python
"""Diagnostics support for Pooldose."""
|
|
|
|
from typing import Any
|
|
|
|
from homeassistant.components.diagnostics import async_redact_data
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
from . import PooldoseConfigEntry
|
|
|
|
TO_REDACT = {
|
|
"IP",
|
|
"MAC",
|
|
"WIFI_SSID",
|
|
"AP_SSID",
|
|
"SERIAL_NUMBER",
|
|
"DEVICE_ID",
|
|
"OWNERID",
|
|
"NAME",
|
|
"GROUPNAME",
|
|
}
|
|
|
|
|
|
async def async_get_config_entry_diagnostics(
|
|
hass: HomeAssistant, entry: PooldoseConfigEntry
|
|
) -> dict[str, Any]:
|
|
"""Return diagnostics for a config entry."""
|
|
coordinator = entry.runtime_data
|
|
|
|
return {
|
|
"device_info": async_redact_data(coordinator.device_info, TO_REDACT),
|
|
"data": coordinator.data,
|
|
}
|