mirror of
https://github.com/esphome/esphome.git
synced 2025-10-28 21:53:48 +00:00
Convert components to async-def syntax (#1821)
This commit is contained in:
@@ -25,10 +25,10 @@ CONFIG_SCHEMA = cv.All(
|
||||
)
|
||||
|
||||
|
||||
def to_code(config):
|
||||
async def to_code(config):
|
||||
var = cg.new_Pvariable(config[CONF_ID])
|
||||
yield ssd1322_base.setup_ssd1322(var, config)
|
||||
yield spi.register_spi_device(var, config)
|
||||
await ssd1322_base.setup_ssd1322(var, config)
|
||||
await spi.register_spi_device(var, config)
|
||||
|
||||
dc = yield cg.gpio_pin_expression(config[CONF_DC_PIN])
|
||||
dc = await cg.gpio_pin_expression(config[CONF_DC_PIN])
|
||||
cg.add(var.set_dc_pin(dc))
|
||||
|
||||
Reference in New Issue
Block a user