From 555499e7d3145de9787704f6a24b6724fbdd3cfb Mon Sep 17 00:00:00 2001 From: Aaron Pica Date: Sun, 6 Jan 2019 22:38:23 +0100 Subject: [PATCH] Fix change from "yield from" to "await" (#162) Change reference from "yield from" to "await". --- docs/asyncio_categorizing_functions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/asyncio_categorizing_functions.md b/docs/asyncio_categorizing_functions.md index a477c073..ff14c90b 100644 --- a/docs/asyncio_categorizing_functions.md +++ b/docs/asyncio_categorizing_functions.md @@ -23,7 +23,7 @@ async def async_look_my_coroutine(target): hass.loop.create_task(async_look_my_coroutine("world")) ``` -In this example, we schedule the coroutine by calling `hass.loop.create_task`. This will add the coroutine to the queue of tasks to be run. When the event loop is running `async_look_my_coroutine` it will suspend the task when `yield from entity.async_turn_on()` is called. At that point a new task will be scheduled to execute `entity.async_turn_on()`. When that job has been executed, `async_look_my_coroutine` will resume. +In this example, we schedule the coroutine by calling `hass.loop.create_task`. This will add the coroutine to the queue of tasks to be run. When the event loop is running `async_look_my_coroutine` it will suspend the task when `await entity.async_turn_on()` is called. At that point a new task will be scheduled to execute `entity.async_turn_on()`. When that job has been executed, `async_look_my_coroutine` will resume. ## The callback function