mirror of
https://github.com/esphome/esphome.git
synced 2025-10-01 09:32:21 +01: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:
@@ -18,8 +18,8 @@ CONFIG_SCHEMA = cv.Schema({})
|
||||
cv.Optional(CONF_PORT, default=21324): cv.port,
|
||||
},
|
||||
)
|
||||
def wled_light_effect_to_code(config, effect_id):
|
||||
async def wled_light_effect_to_code(config, effect_id):
|
||||
effect = cg.new_Pvariable(effect_id, config[CONF_NAME])
|
||||
cg.add(effect.set_port(config[CONF_PORT]))
|
||||
|
||||
yield effect
|
||||
return effect
|
||||
|
Reference in New Issue
Block a user