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 GitHub
parent 54d314d1d0
commit 4ad16b56f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,15 +31,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