From d0d43f8872f741e6efacf93b6794db7334760b7c Mon Sep 17 00:00:00 2001 From: Pastaloverzzz <155114099+Pastaloverzzz@users.noreply.github.com> Date: Thu, 31 Oct 2024 13:26:24 +0100 Subject: [PATCH] Update __init__.py --- custom_components/dahua/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/custom_components/dahua/__init__.py b/custom_components/dahua/__init__.py index 03ae4f5..d54dc5f 100755 --- a/custom_components/dahua/__init__.py +++ b/custom_components/dahua/__init__.py @@ -14,10 +14,11 @@ from aiohttp import ClientError, ClientResponseError, ClientSession, TCPConnector from homeassistant.config_entries import ConfigEntry -from homeassistant.core import CALLBACK_TYPE, Config, HomeAssistant +from homeassistant.core import CALLBACK_TYPE, HomeAssistant from homeassistant.exceptions import ConfigEntryNotReady, PlatformNotReady from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed from homeassistant.helpers.aiohttp_client import async_get_clientsession +from homeassistant.helpers.typing import ConfigType from homeassistant.const import EVENT_HOMEASSISTANT_STOP from custom_components.dahua.thread import DahuaEventThread, DahuaVtoEventThread @@ -50,7 +51,7 @@ _LOGGER: logging.Logger = logging.getLogger(__package__) -async def async_setup(hass: HomeAssistant, config: Config): +async def async_setup(hass: HomeAssistant, config: ConfigType): """ Set up this integration with the UI. YAML is not supported. https://developers.home-assistant.io/docs/asyncio_working_with_async/ @@ -59,7 +60,7 @@ async def async_setup(hass: HomeAssistant, config: Config): return True -async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry): +async def async_setup_entry(hass: HomeAssistant, entry: ConfigType): """Set up this integration using UI.""" if hass.data.get(DOMAIN) is None: hass.data.setdefault(DOMAIN, {})