From 3ec1fb2ccda50d8a719d9ad1b825a9812df2ed18 Mon Sep 17 00:00:00 2001 From: Mihail Morosan Date: Wed, 27 Nov 2024 14:22:51 +0000 Subject: [PATCH] Remove deprecated call to async_forward_entry_setup --- custom_components/london_tfl/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/custom_components/london_tfl/__init__.py b/custom_components/london_tfl/__init__.py index 3d8f707..13410da 100644 --- a/custom_components/london_tfl/__init__.py +++ b/custom_components/london_tfl/__init__.py @@ -2,10 +2,13 @@ import logging from homeassistant import config_entries, core +from homeassistant.const import Platform from .const import DOMAIN +PLATFORMS = [Platform.SENSOR] + _LOGGER = logging.getLogger(__name__) @@ -17,9 +20,7 @@ async def async_setup_entry( hass.data[DOMAIN][entry.entry_id] = entry.data # Forward the setup to the sensor platform. - hass.async_create_task( - hass.config_entries.async_forward_entry_setup(entry, "sensor") - ) + await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS) return True