diff --git a/docs/asyncio_working_with_async.md b/docs/asyncio_working_with_async.md index de6d0f9d..075f903b 100644 --- a/docs/asyncio_working_with_async.md +++ b/docs/asyncio_working_with_async.md @@ -74,10 +74,10 @@ Sometimes it will happen that you’re in a thread and you want to call a functi In the following example, `say_hello` will schedule `async_say_hello` and block till the function has run and get the result back. ```python -from homeassistant.util.async_ import run_callback_threadsafe +from homeassistant.util.async_ import run_coroutine_threadsafe def say_hello(hass, target): - return run_callback_threadsafe( + return run_coroutine_threadsafe( hass.loop, async_say_hello, target).result() async def async_say_hello(hass, target):