mirror of
https://github.com/home-assistant/core.git
synced 2026-05-31 20:54:23 +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>
26 lines
673 B
Python
26 lines
673 B
Python
"""Diagnostics support for tedee."""
|
|
|
|
from typing import Any
|
|
|
|
from homeassistant.components.diagnostics import async_redact_data
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
from . import TedeeConfigEntry
|
|
|
|
TO_REDACT = {
|
|
"id",
|
|
}
|
|
|
|
|
|
async def async_get_config_entry_diagnostics(
|
|
hass: HomeAssistant, entry: TedeeConfigEntry
|
|
) -> dict[str, Any]:
|
|
"""Return diagnostics for a config entry."""
|
|
coordinator = entry.runtime_data
|
|
# dict has sensitive info as key, redact manually
|
|
data = {
|
|
index: lock.to_dict()
|
|
for index, (_, lock) in enumerate(coordinator.tedee_client.locks_dict.items())
|
|
}
|
|
return async_redact_data(data, TO_REDACT)
|