From b358a03379c821d0c3aed16302f5bdda45500ff6 Mon Sep 17 00:00:00 2001 From: Paul Daumlechner Date: Sun, 18 Feb 2024 20:39:02 +0100 Subject: [PATCH] Fix Velux setup (#110886) fix async_setup without configuration.yaml entry --- homeassistant/components/velux/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/velux/__init__.py b/homeassistant/components/velux/__init__.py index 64da09b7ac2..9bc9c93e0d1 100644 --- a/homeassistant/components/velux/__init__.py +++ b/homeassistant/components/velux/__init__.py @@ -29,11 +29,14 @@ CONFIG_SCHEMA = vol.Schema( async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: """Set up the velux component.""" + if DOMAIN not in config: + return True + hass.async_create_task( hass.config_entries.flow.async_init( DOMAIN, context={"source": SOURCE_IMPORT}, - data=config, + data=config[DOMAIN], ) )