From 04d53ab8cca8204a91058cc178bec23c4d71b227 Mon Sep 17 00:00:00 2001 From: tsunglung Date: Wed, 4 Sep 2024 21:50:17 +0800 Subject: [PATCH] Fix deprecated async_forward_entry_setup --- custom_components/opencwb/__init__.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/custom_components/opencwb/__init__.py b/custom_components/opencwb/__init__.py index 3fc5453..7861b05 100755 --- a/custom_components/opencwb/__init__.py +++ b/custom_components/opencwb/__init__.py @@ -66,11 +66,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry): ENTRY_WEATHER_COORDINATOR: weather_coordinator, } - 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) update_listener = config_entry.add_update_listener(async_update_options) hass.data[DOMAIN][config_entry.entry_id][UPDATE_LISTENER] = update_listener