1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-29 00:22:21 +01:00
* Add black

Update pre commit

Update pre commit

add empty line

* Format with black
This commit is contained in:
Guillermo Ruffino
2021-03-07 16:03:16 -03:00
committed by GitHub
parent 2b60b0f1fa
commit 69879920eb
398 changed files with 21624 additions and 12644 deletions

View File

@@ -4,15 +4,20 @@ from esphome.components.light.types import AddressableLightEffect
from esphome.components.light.effects import register_addressable_effect
from esphome.const import CONF_NAME, CONF_PORT
wled_ns = cg.esphome_ns.namespace('wled')
WLEDLightEffect = wled_ns.class_('WLEDLightEffect', AddressableLightEffect)
wled_ns = cg.esphome_ns.namespace("wled")
WLEDLightEffect = wled_ns.class_("WLEDLightEffect", AddressableLightEffect)
CONFIG_SCHEMA = cv.Schema({})
@register_addressable_effect('wled', WLEDLightEffect, "WLED", {
cv.Optional(CONF_PORT, default=21324): cv.port,
})
@register_addressable_effect(
"wled",
WLEDLightEffect,
"WLED",
{
cv.Optional(CONF_PORT, default=21324): cv.port,
},
)
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]))