mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-22 05:43:28 +02: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