Files
home-assistant-core/homeassistant/components/paperless_ngx/diagnostics.py
T
epenetGitHubcopilot-swe-agent[bot] <[email protected]>frenck
d766aae436 Remove import annotations from components (#169536)
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: frenck <[email protected]>
2026-04-30 21:14:48 +02:00

23 lines
606 B
Python

"""Diagnostics support for Paperless-ngx."""
from dataclasses import asdict
from typing import Any
from homeassistant.core import HomeAssistant
from . import PaperlessConfigEntry
async def async_get_config_entry_diagnostics(
hass: HomeAssistant,
entry: PaperlessConfigEntry,
) -> dict[str, Any]:
"""Return diagnostics for a config entry."""
return {
"pngx_version": entry.runtime_data.status.api.host_version,
"data": {
"statistics": asdict(entry.runtime_data.statistics.data),
"status": asdict(entry.runtime_data.status.data),
},
}