mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 09:17:46 +01:00
13 lines
482 B
Python
13 lines
482 B
Python
import esphomeyaml.config_validation as cv
|
|
from esphomeyaml.const import CONF_DEFAULT_TRANSITION_LENGTH
|
|
from esphomeyaml.helpers import add, setup_mqtt_component
|
|
|
|
PLATFORM_SCHEMA = cv.PLATFORM_SCHEMA.extend({
|
|
|
|
}).extend(cv.MQTT_COMMAND_COMPONENT_SCHEMA.schema)
|
|
|
|
|
|
def setup_mqtt_light_component(obj, config):
|
|
if CONF_DEFAULT_TRANSITION_LENGTH in config:
|
|
add(obj.set_default_transition_length(config[CONF_DEFAULT_TRANSITION_LENGTH]))
|
|
setup_mqtt_component(obj, config)
|