1
0
mirror of https://github.com/home-assistant/core.git synced 2026-05-17 22:10:57 +01:00
Files
core/homeassistant/components/tedee/diagnostics.py
T
Josef Zweck b518729367 Bump aiotedee to 0.3.0 (#166321)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2026-03-24 15:23:48 +01:00

28 lines
709 B
Python

"""Diagnostics support for tedee."""
from __future__ import annotations
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)