From 5b07471e61079ae81f5064420427d4f9a5892913 Mon Sep 17 00:00:00 2001 From: andreapier Date: Mon, 11 Nov 2024 09:47:55 +0100 Subject: [PATCH] Fix async_forward_entry_setup deprecation - Fix #169 --- custom_components/econnect_metronet/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/custom_components/econnect_metronet/__init__.py b/custom_components/econnect_metronet/__init__.py index 47371cf..7d8e71c 100644 --- a/custom_components/econnect_metronet/__init__.py +++ b/custom_components/econnect_metronet/__init__.py @@ -132,8 +132,7 @@ async def async_setup_entry(hass: HomeAssistant, config: ConfigEntry) -> bool: hass.services.async_register(DOMAIN, "disarm_sectors", partial(services.disarm_sectors, hass, config.entry_id)) hass.services.async_register(DOMAIN, "update_state", partial(services.update_state, hass, config.entry_id)) - for component in PLATFORMS: - hass.async_create_task(hass.config_entries.async_forward_entry_setup(config, component)) + await hass.config_entries.async_forward_entry_setups(config, PLATFORMS) return True