From 60b107dfcbb69432ef9682bb4485a4396b363917 Mon Sep 17 00:00:00 2001 From: Neo2SHYAlien Date: Wed, 11 Dec 2024 10:58:33 +0200 Subject: [PATCH] Migrate hass.config_entries.async_forward_entry_setup to async_forward_entry_setups Deprecated async_forward_entry_setup Close #1064 and #1020 --- custom_components/adaptive_lighting/__init__.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/custom_components/adaptive_lighting/__init__.py b/custom_components/adaptive_lighting/__init__.py index a235d70fd..13c2d7d11 100644 --- a/custom_components/adaptive_lighting/__init__.py +++ b/custom_components/adaptive_lighting/__init__.py @@ -65,10 +65,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry): undo_listener = config_entry.add_update_listener(async_update_options) data[config_entry.entry_id] = {UNDO_UPDATE_LISTENER: undo_listener} - for platform in PLATFORMS: - hass.async_create_task( - hass.config_entries.async_forward_entry_setup(config_entry, platform), - ) + await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS) return True