mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Add small speed improvement when unloading Notion (#28757)
This commit is contained in:
parent
c27b94c0e5
commit
31131e4ac6
@ -144,8 +144,12 @@ async def async_unload_entry(hass, config_entry):
|
|||||||
cancel = hass.data[DOMAIN][DATA_LISTENER].pop(config_entry.entry_id)
|
cancel = hass.data[DOMAIN][DATA_LISTENER].pop(config_entry.entry_id)
|
||||||
cancel()
|
cancel()
|
||||||
|
|
||||||
for component in ("binary_sensor", "sensor"):
|
tasks = [
|
||||||
await hass.config_entries.async_forward_entry_unload(config_entry, component)
|
hass.config_entries.async_forward_entry_unload(config_entry, component)
|
||||||
|
for component in ("binary_sensor", "sensor")
|
||||||
|
]
|
||||||
|
|
||||||
|
await asyncio.gather(*tasks)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user