Import from thread instead event loop

This commit is contained in:
larena1
2024-05-01 21:17:07 +02:00
committed by 5ila5
parent 60c8d9c5db
commit 2eb8a854a7

View File

@@ -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