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