Skip to content

Commit

Permalink
Fix Velux setup (home-assistant#110886)
Browse files Browse the repository at this point in the history
fix async_setup without configuration.yaml entry
  • Loading branch information
pawlizio authored Feb 18, 2024
1 parent fdd4518 commit b358a03
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion homeassistant/components/velux/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@

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],
)
)

Expand Down

0 comments on commit b358a03

Please sign in to comment.