-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fe19f07
commit 56b6cde
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
"""Diagnostics support for Midea AC LAN.""" | ||
|
||
from __future__ import annotations | ||
|
||
from typing import TYPE_CHECKING, Any | ||
|
||
from homeassistant.components.diagnostics import async_redact_data | ||
from homeassistant.const import ( | ||
CONF_TOKEN, | ||
) | ||
|
||
if TYPE_CHECKING: | ||
from homeassistant.config_entries import ConfigEntry | ||
from homeassistant.core import HomeAssistant | ||
|
||
from .const import CONF_KEY | ||
|
||
TO_REDACT = {CONF_TOKEN, CONF_KEY} | ||
|
||
|
||
async def async_get_config_entry_diagnostics( | ||
hass: HomeAssistant, # noqa: ARG001 | ||
entry: ConfigEntry, | ||
) -> dict[str, Any]: | ||
"""Return diagnostics for a config entry. | ||
Returns | ||
------- | ||
Dictionary of config | ||
""" | ||
return {"entry": async_redact_data(entry.as_dict(), TO_REDACT)} |