2022-02-08 11:43:45 +00:00
|
|
|
"""Diagnostics support for Plugwise."""
|
2024-03-08 14:04:07 +00:00
|
|
|
|
2022-02-08 11:43:45 +00:00
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
from typing import Any
|
|
|
|
|
|
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
|
2024-05-13 07:38:06 +00:00
|
|
|
from . import PlugwiseConfigEntry
|
2022-02-08 11:43:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
async def async_get_config_entry_diagnostics(
|
2024-05-13 07:38:06 +00:00
|
|
|
hass: HomeAssistant, entry: PlugwiseConfigEntry
|
2022-02-08 11:43:45 +00:00
|
|
|
) -> dict[str, Any]:
|
|
|
|
"""Return diagnostics for a config entry."""
|
2024-05-13 07:38:06 +00:00
|
|
|
coordinator = entry.runtime_data
|
2022-02-08 11:43:45 +00:00
|
|
|
return {
|
|
|
|
"gateway": coordinator.data.gateway,
|
|
|
|
"devices": coordinator.data.devices,
|
|
|
|
}
|