diff --git a/custom_components/waste_collection_schedule/__init__.py b/custom_components/waste_collection_schedule/__init__.py index 766064e57..32e5eabc5 100644 --- a/custom_components/waste_collection_schedule/__init__.py +++ b/custom_components/waste_collection_schedule/__init__.py @@ -8,6 +8,7 @@ import homeassistant.util.dt as dt_util import voluptuous as vol from homeassistant.core import HomeAssistant, ServiceCall, callback +from homeassistant.helpers.discovery import async_load_platform from homeassistant.helpers.dispatcher import dispatcher_send from .const import DOMAIN, UPDATE_SENSORS_SIGNAL @@ -117,9 +118,7 @@ async def async_setup(hass: HomeAssistant, config: dict): hass.data.setdefault(DOMAIN, api) # load calendar platform - await hass.helpers.discovery.async_load_platform( - "calendar", DOMAIN, {"api": api}, config - ) + await async_load_platform(hass, "calendar", DOMAIN, {"api": api}, config) # initial fetch of all data hass.add_job(api._fetch)