mirror of
https://github.com/home-assistant/core.git
synced 2026-05-29 19:57:40 +01:00
d766aae436
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: frenck <195327+frenck@users.noreply.github.com>
23 lines
721 B
Python
23 lines
721 B
Python
"""Support for Powerfox Local diagnostics."""
|
|
|
|
from typing import Any
|
|
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
from .coordinator import PowerfoxLocalConfigEntry
|
|
|
|
|
|
async def async_get_config_entry_diagnostics(
|
|
hass: HomeAssistant, entry: PowerfoxLocalConfigEntry
|
|
) -> dict[str, Any]:
|
|
"""Return diagnostics for Powerfox Local config entry."""
|
|
coordinator = entry.runtime_data
|
|
|
|
return {
|
|
"power": coordinator.data.power,
|
|
"energy_usage": coordinator.data.energy_usage,
|
|
"energy_usage_high_tariff": coordinator.data.energy_usage_high_tariff,
|
|
"energy_usage_low_tariff": coordinator.data.energy_usage_low_tariff,
|
|
"energy_return": coordinator.data.energy_return,
|
|
}
|