2022-01-23 08:02:14 +00:00
|
|
|
"""Diagnostics support for Elgato."""
|
2024-03-08 13:15:26 +00:00
|
|
|
|
2022-01-23 08:02:14 +00:00
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
from typing import Any
|
|
|
|
|
|
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
|
2024-05-06 17:12:01 +00:00
|
|
|
from . import ElgatorConfigEntry
|
2022-01-23 08:02:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
async def async_get_config_entry_diagnostics(
|
2024-05-06 17:12:01 +00:00
|
|
|
hass: HomeAssistant, entry: ElgatorConfigEntry
|
2022-01-23 08:02:14 +00:00
|
|
|
) -> dict[str, Any]:
|
|
|
|
"""Return diagnostics for a config entry."""
|
2024-05-06 17:12:01 +00:00
|
|
|
coordinator = entry.runtime_data
|
2022-01-23 08:02:14 +00:00
|
|
|
return {
|
2023-11-06 19:24:01 +00:00
|
|
|
"info": coordinator.data.info.to_dict(),
|
|
|
|
"state": coordinator.data.state.to_dict(),
|
2022-01-23 08:02:14 +00:00
|
|
|
}
|