mirror of
https://github.com/esphome/esphome.git
synced 2025-10-30 06:33:51 +00:00
Convert components to async-def syntax (#1821)
This commit is contained in:
@@ -50,9 +50,9 @@ def ds1307_read_time_to_code(config, action_id, template_arg, args):
|
||||
yield var
|
||||
|
||||
|
||||
def to_code(config):
|
||||
async def to_code(config):
|
||||
var = cg.new_Pvariable(config[CONF_ID])
|
||||
|
||||
yield cg.register_component(var, config)
|
||||
yield i2c.register_i2c_device(var, config)
|
||||
yield time.register_time(var, config)
|
||||
await cg.register_component(var, config)
|
||||
await i2c.register_i2c_device(var, config)
|
||||
await time.register_time(var, config)
|
||||
|
||||
Reference in New Issue
Block a user