mirror of
https://github.com/home-assistant/core
synced 2024-10-15 08:22:00 +00:00
Load local calendar ics in background thread to avoid timezone I/O in event loop (#120276)
This commit is contained in:
parent
6a5c1fc613
commit
fa9bced6b0
|
@ -44,7 +44,9 @@ async def async_setup_entry(
|
|||
"""Set up the local calendar platform."""
|
||||
store = hass.data[DOMAIN][config_entry.entry_id]
|
||||
ics = await store.async_load()
|
||||
calendar = IcsCalendarStream.calendar_from_ics(ics)
|
||||
calendar: Calendar = await hass.async_add_executor_job(
|
||||
IcsCalendarStream.calendar_from_ics, ics
|
||||
)
|
||||
calendar.prodid = PRODID
|
||||
|
||||
name = config_entry.data[CONF_CALENDAR_NAME]
|
||||
|
|
Loading…
Reference in a new issue