mirror of
https://github.com/esphome/esphome.git
synced 2025-09-29 00:22:21 +01:00
add-black (#1593)
* Add black Update pre commit Update pre commit add empty line * Format with black
This commit is contained in:
committed by
GitHub
parent
2b60b0f1fa
commit
69879920eb
@@ -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]))
|
||||
|
Reference in New Issue
Block a user