mirror of
https://github.com/home-assistant/core.git
synced 2026-10-02 15:43:55 +01:00
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: frenck <195327+frenck@users.noreply.github.com>
22 lines
596 B
Python
22 lines
596 B
Python
"""Diagnostics platform for Uptime Kuma."""
|
|
|
|
from dataclasses import asdict
|
|
from typing import Any
|
|
|
|
from homeassistant.components.diagnostics import async_redact_data
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
from .coordinator import UptimeKumaConfigEntry
|
|
|
|
TO_REDACT = {"monitor_url", "monitor_hostname"}
|
|
|
|
|
|
async def async_get_config_entry_diagnostics(
|
|
hass: HomeAssistant, entry: UptimeKumaConfigEntry
|
|
) -> dict[str, Any]:
|
|
"""Return diagnostics for a config entry."""
|
|
|
|
return async_redact_data(
|
|
{k: asdict(v) for k, v in entry.runtime_data.data.items()}, TO_REDACT
|
|
)
|