mirror of
https://github.com/home-assistant/core.git
synced 2026-05-26 10:15:33 +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>
20 lines
554 B
Python
20 lines
554 B
Python
"""Diagnostics support for Fumis."""
|
|
|
|
from typing import Any
|
|
|
|
from homeassistant.components.diagnostics import async_redact_data
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
from .coordinator import FumisConfigEntry
|
|
|
|
TO_REDACT_UNIT = {"id", "ip"}
|
|
|
|
|
|
async def async_get_config_entry_diagnostics(
|
|
hass: HomeAssistant, entry: FumisConfigEntry
|
|
) -> dict[str, Any]:
|
|
"""Return diagnostics for a config entry."""
|
|
data = await entry.runtime_data.client.raw_status()
|
|
data["unit"] = async_redact_data(data["unit"], TO_REDACT_UNIT)
|
|
return data
|