mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-03 19:38:30 +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:
@@ -61,6 +61,6 @@ SN74HC595_INPUT_PIN_SCHEMA = cv.Schema({})
|
||||
@pins.PIN_SCHEMA_REGISTRY.register(
|
||||
CONF_SN74HC595, (SN74HC595_OUTPUT_PIN_SCHEMA, SN74HC595_INPUT_PIN_SCHEMA)
|
||||
)
|
||||
def sn74hc595_pin_to_code(config):
|
||||
parent = yield cg.get_variable(config[CONF_SN74HC595])
|
||||
yield SN74HC595GPIOPin.new(parent, config[CONF_NUMBER], config[CONF_INVERTED])
|
||||
async def sn74hc595_pin_to_code(config):
|
||||
parent = await cg.get_variable(config[CONF_SN74HC595])
|
||||
return SN74HC595GPIOPin.new(parent, config[CONF_NUMBER], config[CONF_INVERTED])
|
||||
|
||||
Reference in New Issue
Block a user