mirror of
https://github.com/home-assistant/core.git
synced 2025-06-05 13:47:06 +00:00
Add small speed improvement when unloading OpenUV (#28758)
This commit is contained in:
parent
31131e4ac6
commit
fae8cd48c4
@ -233,8 +233,12 @@ async def async_unload_entry(hass, config_entry):
|
|||||||
"""Unload an OpenUV config entry."""
|
"""Unload an OpenUV config entry."""
|
||||||
hass.data[DOMAIN][DATA_OPENUV_CLIENT].pop(config_entry.entry_id)
|
hass.data[DOMAIN][DATA_OPENUV_CLIENT].pop(config_entry.entry_id)
|
||||||
|
|
||||||
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