handle_presence_simulation_sync is called by an executor, which means it may run in a thread besides the event-loop's thread. So it's not safe to call hass.async_create_task, which uses loop.create_task, which checks that it's only called from the event thread. Instead I think it's necessary to call hass.create_task, which is safe to call from non-event-loop threads.
I encountered this issue after an update, when I started getting errors in presence simulation from the asyncio loop complaining that create_task was called from the wrong thread.
handle_presence_simulation_sync is called by an executor, which means it may run in a thread besides the event-loop's thread. So it's not safe to call hass.async_create_task, which uses loop.create_task, which checks that it's only called from the event thread. Instead I think it's necessary to call hass.create_task, which is safe to call from non-event-loop threads.
I encountered this issue after an update, when I started getting errors in presence simulation from the asyncio loop complaining that create_task was called from the wrong thread.