Fix setup Fast.com (#105580)

* Fix setup fastdotcom

* Add if
This commit is contained in:
G Johansson 2023-12-12 20:43:09 +01:00 committed by Franck Nijhof
parent fbb315b0a8
commit 8b3ba452bc
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3

View File

@ -35,15 +35,16 @@ CONFIG_SCHEMA = vol.Schema(
)
async def async_setup_platform(hass: HomeAssistant, config: ConfigType) -> bool:
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Set up the Fast.com component. (deprecated)."""
hass.async_create_task(
hass.config_entries.flow.async_init(
DOMAIN,
context={"source": SOURCE_IMPORT},
data=config[DOMAIN],
if DOMAIN in config:
hass.async_create_task(
hass.config_entries.flow.async_init(
DOMAIN,
context={"source": SOURCE_IMPORT},
data=config[DOMAIN],
)
)
)
return True