mirror of
https://github.com/home-assistant/core.git
synced 2026-04-17 23:53:49 +01:00
24 lines
600 B
Python
24 lines
600 B
Python
"""Provides diagnostics for Ohme."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Any
|
|
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
from .coordinator import OhmeConfigEntry
|
|
|
|
|
|
async def async_get_config_entry_diagnostics(
|
|
hass: HomeAssistant, config_entry: OhmeConfigEntry
|
|
) -> dict[str, Any]:
|
|
"""Return diagnostics for Ohme."""
|
|
coordinators = config_entry.runtime_data
|
|
client = coordinators.charge_session_coordinator.client
|
|
|
|
return {
|
|
"device_info": client.device_info,
|
|
"vehicles": client.vehicles,
|
|
"cap_available": client.cap_available,
|
|
}
|