Files
core/homeassistant/components/brother/diagnostics.py
epenetGitHubcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>frenck
d766aae436 Remove import annotations from components (#169536)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: frenck <195327+frenck@users.noreply.github.com>
2026-04-30 21:14:48 +02:00

23 lines
602 B
Python

"""Diagnostics support for Brother."""
from dataclasses import asdict
from typing import Any
from homeassistant.core import HomeAssistant
from .coordinator import BrotherConfigEntry
async def async_get_config_entry_diagnostics(
hass: HomeAssistant, config_entry: BrotherConfigEntry
) -> dict[str, Any]:
"""Return diagnostics for a config entry."""
coordinator = config_entry.runtime_data
return {
"info": dict(config_entry.data),
"data": asdict(coordinator.data),
"model": coordinator.brother.model,
"firmware": coordinator.brother.firmware,
}