From c5678bd9f430b1540efff812f8d7259488255763 Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Thu, 11 Jan 2024 22:44:16 +0100 Subject: [PATCH] Don't pass coroutine's to wait (#200) --- __init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/__init__.py b/__init__.py index 2a1473b..ccbbb6f 100644 --- a/__init__.py +++ b/__init__.py @@ -220,7 +220,6 @@ def access_data_write(data): systems_enabled = set(coordinator.data.keys()) for system_id, system_raw in coordinator.data.items(): - if system_id not in systems_enabled: continue @@ -243,7 +242,7 @@ async def async_unload_entry(hass: HomeAssistant, entry): entry, FORWARD_PLATFORMS ) if unload_ok: - await asyncio.wait([system.unload() for system in data.systems.values()]) + await asyncio.gather(*[system.unload() for system in data.systems.values()]) await data.session.close() hass.data[DATA_NIBE_ENTRIES].pop(entry.entry_id)