mirror of
https://github.com/esphome/esphome.git
synced 2025-11-16 06:45:48 +00:00
Convert components to async-def syntax (#1821)
This commit is contained in:
@@ -97,7 +97,7 @@ def setup_conf(config, key, hub):
|
||||
cg.add(getattr(hub, f"set_{key}_sample_rate")(conf[CONF_SAMPLE_RATE]))
|
||||
|
||||
|
||||
def to_code(config):
|
||||
hub = yield cg.get_variable(config[CONF_BME680_BSEC_ID])
|
||||
async def to_code(config):
|
||||
hub = await cg.get_variable(config[CONF_BME680_BSEC_ID])
|
||||
for key in TYPES:
|
||||
yield setup_conf(config, key, hub)
|
||||
await setup_conf(config, key, hub)
|
||||
|
||||
Reference in New Issue
Block a user