2018-04-07 01:23:03 +02:00
|
|
|
import esphomeyaml.config_validation as cv
|
|
|
|
from esphomeyaml.const import CONF_DEFAULT_TRANSITION_LENGTH
|
2018-04-18 18:43:13 +02:00
|
|
|
from esphomeyaml.helpers import add
|
2018-04-07 01:23:03 +02:00
|
|
|
|
|
|
|
PLATFORM_SCHEMA = cv.PLATFORM_SCHEMA.extend({
|
|
|
|
|
|
|
|
}).extend(cv.MQTT_COMMAND_COMPONENT_SCHEMA.schema)
|
|
|
|
|
|
|
|
|
2018-04-18 18:43:13 +02:00
|
|
|
def setup_light_component(obj, config):
|
2018-04-07 01:23:03 +02:00
|
|
|
if CONF_DEFAULT_TRANSITION_LENGTH in config:
|
|
|
|
add(obj.set_default_transition_length(config[CONF_DEFAULT_TRANSITION_LENGTH]))
|
2018-04-18 18:43:13 +02:00
|
|
|
|
|
|
|
|
|
|
|
def build_flags(config):
|
|
|
|
return '-DUSE_LIGHT'
|