Merge branch 'master' into feature/adc328

This commit is contained in:
andvikt
2021-09-18 22:21:10 +03:00
committed by GitHub
2 changed files with 5 additions and 3 deletions

View File

@@ -210,7 +210,7 @@ async def async_remove_entry(hass: HomeAssistant, entry: ConfigEntry) -> None:
id = entry.data.get('id', entry.entry_id)
hub: MegaD = hass.data[DOMAIN].get(id)
if hub is None:
return
return True
_LOGGER.debug(f'remove {id}')
_hubs.pop(id, None)
hass.data[DOMAIN].pop(id, None)
@@ -221,7 +221,7 @@ async def async_remove_entry(hass: HomeAssistant, entry: ConfigEntry) -> None:
if task is not None:
task.cancel()
if hub is None:
return
return True
await hub.stop()
return True