diff --git a/custom_components/waste_collection_schedule/__init__.py b/custom_components/waste_collection_schedule/__init__.py index 32e5eabc..91af4778 100644 --- a/custom_components/waste_collection_schedule/__init__.py +++ b/custom_components/waste_collection_schedule/__init__.py @@ -107,11 +107,12 @@ async def async_setup(hass: HomeAssistant, config: dict): use_dedicated_calendar=c.get(CONF_USE_DEDICATED_CALENDAR, False), dedicated_calendar_title=c.get(CONF_DEDICATED_CALENDAR_TITLE, False), ) - api.add_source_shell( - source_name=source[CONF_SOURCE_NAME], - customize=customize, - calendar_title=source.get(CONF_SOURCE_CALENDAR_TITLE), - source_args=source.get(CONF_SOURCE_ARGS, {}), + await hass.async_add_executor_job( + api.add_source_shell, + source[CONF_SOURCE_NAME], + customize, + source.get(CONF_SOURCE_ARGS, {}), + source.get(CONF_SOURCE_CALENDAR_TITLE), ) # store api object