mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 10:59:40 +00:00
* Explicitly pass config entry to coordinator in Elgato * Make it noice! * Apply suggestions from code review Co-authored-by: epenet <6771947+epenet@users.noreply.github.com> * Adjustment from review comment --------- Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
21 lines
512 B
Python
21 lines
512 B
Python
"""Diagnostics support for Elgato."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Any
|
|
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
from .coordinator import ElgatoConfigEntry
|
|
|
|
|
|
async def async_get_config_entry_diagnostics(
|
|
hass: HomeAssistant, entry: ElgatoConfigEntry
|
|
) -> dict[str, Any]:
|
|
"""Return diagnostics for a config entry."""
|
|
coordinator = entry.runtime_data
|
|
return {
|
|
"info": coordinator.data.info.to_dict(),
|
|
"state": coordinator.data.state.to_dict(),
|
|
}
|