From 93425d2782c6fa2da51c276c1d5cd667b0915e07 Mon Sep 17 00:00:00 2001 From: Jorim Tielemans Date: Wed, 30 Oct 2024 21:09:42 +0100 Subject: [PATCH] Fix Config import ConfigType to be used instead --- custom_components/pyscript/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/custom_components/pyscript/__init__.py b/custom_components/pyscript/__init__.py index 3a96241..e12ec04 100644 --- a/custom_components/pyscript/__init__.py +++ b/custom_components/pyscript/__init__.py @@ -21,10 +21,11 @@ EVENT_STATE_CHANGED, SERVICE_RELOAD, ) -from homeassistant.core import Config, Event as HAEvent, HomeAssistant, ServiceCall +from homeassistant.core import Event as HAEvent, HomeAssistant, ServiceCall from homeassistant.exceptions import HomeAssistantError import homeassistant.helpers.config_validation as cv from homeassistant.helpers.restore_state import DATA_RESTORE_STATE +from homeassistant.helpers.typing import ConfigType from homeassistant.loader import bind_hass from .const import ( @@ -64,7 +65,7 @@ CONFIG_SCHEMA = vol.Schema({DOMAIN: PYSCRIPT_SCHEMA}, extra=vol.ALLOW_EXTRA) -async def async_setup(hass: HomeAssistant, config: Config) -> bool: +async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: """Component setup, run import config flow for each entry in config.""" await restore_state(hass) if DOMAIN in config: