1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-12 00:02:21 +01:00

Convert components to async-def syntax (#1823)

* Convert components to async-def syntax

* Remove stray @coroutine

* Manual part

* Convert complexer components code to async-def

* Manual cleanup

* More manual cleanup
This commit is contained in:
Otto Winter
2021-05-24 21:45:31 +02:00
committed by GitHub
parent 93d9d4b50a
commit a33bb32874
60 changed files with 592 additions and 633 deletions

View File

@@ -169,13 +169,13 @@ async def display_page_show_previous_to_code(config, action_id, template_arg, ar
key=CONF_PAGE_ID,
),
)
def display_is_displaying_page_to_code(config, condition_id, template_arg, args):
paren = yield cg.get_variable(config[CONF_ID])
page = yield cg.get_variable(config[CONF_PAGE_ID])
async def display_is_displaying_page_to_code(config, condition_id, template_arg, args):
paren = await cg.get_variable(config[CONF_ID])
page = await cg.get_variable(config[CONF_PAGE_ID])
var = cg.new_Pvariable(condition_id, template_arg, paren)
cg.add(var.set_page(page))
yield var
return var
@coroutine_with_priority(100.0)