From f5451f64a3e556e315cc12130b3808784fe7dfc2 Mon Sep 17 00:00:00 2001 From: Phil Cole Date: Sat, 26 Aug 2017 20:07:14 +0100 Subject: [PATCH] Fix missing closed bracket in example code (#3251) --- source/developers/asyncio_categorizing_functions.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/developers/asyncio_categorizing_functions.markdown b/source/developers/asyncio_categorizing_functions.markdown index bd3ff859b8b..6fe74ad359d 100644 --- a/source/developers/asyncio_categorizing_functions.markdown +++ b/source/developers/asyncio_categorizing_functions.markdown @@ -30,7 +30,7 @@ def async_look_my_coroutine(target): if result: print("hello {}".format(target)) -hass.loop.create_task(async_look_my_coroutine("world") +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.