mirror of
https://github.com/esphome/esphome.git
synced 2025-09-18 03:02:20 +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:
@@ -78,9 +78,9 @@ async def to_code(config):
|
||||
}
|
||||
),
|
||||
)
|
||||
def ledc_set_frequency_to_code(config, action_id, template_arg, args):
|
||||
paren = yield cg.get_variable(config[CONF_ID])
|
||||
async def ledc_set_frequency_to_code(config, action_id, template_arg, args):
|
||||
paren = await cg.get_variable(config[CONF_ID])
|
||||
var = cg.new_Pvariable(action_id, template_arg, paren)
|
||||
template_ = yield cg.templatable(config[CONF_FREQUENCY], args, float)
|
||||
template_ = await cg.templatable(config[CONF_FREQUENCY], args, float)
|
||||
cg.add(var.set_frequency(template_))
|
||||
yield var
|
||||
return var
|
||||
|
Reference in New Issue
Block a user