Fix yeelight config validation (#21295)

pull/21296/head
Paulus Schoutsen 2019-02-21 16:39:17 -08:00 committed by Paulus Schoutsen
parent df5b17d139
commit 07e04e5b84
1 changed files with 4 additions and 3 deletions

View File

@ -77,15 +77,16 @@ DEVICE_SCHEMA = vol.Schema({
vol.Optional(CONF_MODE_MUSIC, default=False): cv.boolean,
vol.Optional(CONF_SAVE_ON_CHANGE, default=False): cv.boolean,
vol.Optional(CONF_MODEL): cv.string,
})
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Optional(CONF_DEVICES, default={}): {cv.string: DEVICE_SCHEMA},
vol.Optional(CONF_CUSTOM_EFFECTS): [{
vol.Required(CONF_NAME): cv.string,
vol.Required(CONF_FLOW_PARAMS): YEELIGHT_FLOW_TRANSITION_SCHEMA
}]
})
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
{vol.Optional(CONF_DEVICES, default={}): {cv.string: DEVICE_SCHEMA}, })
SUPPORT_YEELIGHT = (SUPPORT_BRIGHTNESS |
SUPPORT_TRANSITION |
SUPPORT_FLASH)