Skip to content

Commit

Permalink
remove deprecated function call 'async_load_platform'
Browse files Browse the repository at this point in the history
  • Loading branch information
5ila5 committed May 3, 2024
1 parent f6d9aea commit b513f8f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions custom_components/waste_collection_schedule/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit b513f8f

Please sign in to comment.