1
0
mirror of https://github.com/home-assistant/core.git synced 2026-07-02 12:17:30 +01:00
Files
core/homeassistant/components/brother/diagnostics.py
T
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,
}