mirror of
https://github.com/esphome/esphome.git
synced 2025-10-29 22:24:26 +00: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:
@@ -9,7 +9,6 @@ from esphome.const import (
|
||||
CONF_ON_DISCONNECT,
|
||||
CONF_TRIGGER_ID,
|
||||
)
|
||||
from esphome.core import coroutine
|
||||
from esphome import automation
|
||||
|
||||
CODEOWNERS = ["@buxtronix"]
|
||||
@@ -68,9 +67,8 @@ BLE_CLIENT_SCHEMA = cv.Schema(
|
||||
)
|
||||
|
||||
|
||||
@coroutine
|
||||
def register_ble_node(var, config):
|
||||
parent = yield cg.get_variable(config[CONF_BLE_CLIENT_ID])
|
||||
async def register_ble_node(var, config):
|
||||
parent = await cg.get_variable(config[CONF_BLE_CLIENT_ID])
|
||||
cg.add(parent.register_ble_node(var))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user