reload service: remove entities before disconnection (#58712)

This commit is contained in:
Matthias Alphart 2021-10-30 00:04:57 +02:00 committed by GitHub
parent b1b782419b
commit fa7b72a4ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -239,15 +239,13 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
# First check for config file. If for some reason it is no longer there
# or knx is no longer mentioned, stop the reload.
config = await async_integration_yaml_config(hass, DOMAIN)
if not config or DOMAIN not in config:
return
await knx_module.xknx.stop()
await asyncio.gather(
*(platform.async_reset() for platform in async_get_platforms(hass, DOMAIN))
)
await knx_module.xknx.stop()
await async_setup(hass, config)