mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 04:07:08 +00:00
Add small speed improvement when unloading RainMachine (#28759)
This commit is contained in:
parent
fae8cd48c4
commit
3f2c344e4f
@ -351,8 +351,12 @@ async def async_unload_entry(hass, config_entry):
|
|||||||
remove_listener = hass.data[DOMAIN][DATA_LISTENER].pop(config_entry.entry_id)
|
remove_listener = hass.data[DOMAIN][DATA_LISTENER].pop(config_entry.entry_id)
|
||||||
remove_listener()
|
remove_listener()
|
||||||
|
|
||||||
for component in ("binary_sensor", "sensor", "switch"):
|
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", "switch")
|
||||||
|
]
|
||||||
|
|
||||||
|
await asyncio.gather(*tasks)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user