mirror of
https://github.com/andvikt/mega_hacs.git
synced 2026-11-05 18:28:44 +05:00
fix #57
This commit is contained in:
1 parent
74b6e200a5
commit
1db5670cfd
1 file changed
+2
-2
@@ -210,7 +210,7 @@ async def async_remove_entry(hass: HomeAssistant, entry: ConfigEntry) -> None:
|
|||||||
id = entry.data.get('id', entry.entry_id)
|
id = entry.data.get('id', entry.entry_id)
|
||||||
hub: MegaD = hass.data[DOMAIN].get(id)
|
hub: MegaD = hass.data[DOMAIN].get(id)
|
||||||
if hub is None:
|
if hub is None:
|
||||||
return
|
return True
|
||||||
_LOGGER.debug(f'remove {id}')
|
_LOGGER.debug(f'remove {id}')
|
||||||
_hubs.pop(id, None)
|
_hubs.pop(id, None)
|
||||||
hass.data[DOMAIN].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:
|
if task is not None:
|
||||||
task.cancel()
|
task.cancel()
|
||||||
if hub is None:
|
if hub is None:
|
||||||
return
|
return True
|
||||||
await hub.stop()
|
await hub.stop()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user