1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-31 07:03:55 +00:00

Convert components to async-def syntax (#1821)

This commit is contained in:
Otto Winter
2021-05-24 10:58:29 +02:00
committed by GitHub
parent b92702a312
commit 2376a2c941
296 changed files with 1423 additions and 1424 deletions

View File

@@ -32,8 +32,8 @@ CONFIG_SCHEMA = cv.Schema(
)
def to_code(config):
async def to_code(config):
for conf in config.get(CONF_ON_EXPOSURE_NOTIFICATION, []):
trigger = cg.new_Pvariable(conf[CONF_TRIGGER_ID])
yield automation.build_automation(trigger, [(ExposureNotification, "x")], conf)
yield esp32_ble_tracker.register_ble_device(trigger, conf)
await automation.build_automation(trigger, [(ExposureNotification, "x")], conf)
await esp32_ble_tracker.register_ble_device(trigger, conf)