mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-01 18:48:28 +02: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:
@@ -69,8 +69,8 @@ PCF8574_INPUT_PIN_SCHEMA = cv.Schema(
|
||||
@pins.PIN_SCHEMA_REGISTRY.register(
|
||||
"pcf8574", (PCF8574_OUTPUT_PIN_SCHEMA, PCF8574_INPUT_PIN_SCHEMA)
|
||||
)
|
||||
def pcf8574_pin_to_code(config):
|
||||
parent = yield cg.get_variable(config[CONF_PCF8574])
|
||||
yield PCF8574GPIOPin.new(
|
||||
async def pcf8574_pin_to_code(config):
|
||||
parent = await cg.get_variable(config[CONF_PCF8574])
|
||||
return PCF8574GPIOPin.new(
|
||||
parent, config[CONF_NUMBER], config[CONF_MODE], config[CONF_INVERTED]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user