Add diagnostics for screenlogic (#67368)

This commit is contained in:
Kevin Worrel
2022-02-28 11:13:56 -08:00
committed by GitHub
parent 148762ce3f
commit 974296697e
2 changed files with 22 additions and 0 deletions

View File

@@ -995,6 +995,7 @@ omit =
homeassistant/components/screenlogic/__init__.py
homeassistant/components/screenlogic/binary_sensor.py
homeassistant/components/screenlogic/climate.py
homeassistant/components/screenlogic/diagnostics.py
homeassistant/components/screenlogic/light.py
homeassistant/components/screenlogic/number.py
homeassistant/components/screenlogic/sensor.py

View File

@@ -0,0 +1,21 @@
"""Diagnostics for Screenlogic."""
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from . import ScreenlogicDataUpdateCoordinator
from .const import DOMAIN
async def async_get_config_entry_diagnostics(
hass: HomeAssistant, config_entry: ConfigEntry
) -> dict:
"""Return diagnostics for a config entry."""
coordinator: ScreenlogicDataUpdateCoordinator = hass.data[DOMAIN][
config_entry.entry_id
]
return {
"config_entry": config_entry.as_dict(),
"data": coordinator.data,
}