GPIO Switch Fix restore_mode validator (#296)

This commit is contained in:
Vladimir Eremin 2019-01-02 17:24:47 +00:00 committed by Otto Winter
parent 4948ad95b0
commit 1d0c812e44

View file

@ -23,7 +23,7 @@ PLATFORM_SCHEMA = cv.nameable(switch.SWITCH_PLATFORM_SCHEMA.extend({
cv.GenerateID(): cv.declare_variable_id(GPIOSwitch), cv.GenerateID(): cv.declare_variable_id(GPIOSwitch),
cv.GenerateID(CONF_MAKE_ID): cv.declare_variable_id(MakeGPIOSwitch), cv.GenerateID(CONF_MAKE_ID): cv.declare_variable_id(MakeGPIOSwitch),
vol.Required(CONF_PIN): pins.gpio_output_pin_schema, vol.Required(CONF_PIN): pins.gpio_output_pin_schema,
vol.Optional(CONF_RESTORE_MODE): cv.one_of(RESTORE_MODES, upper=True, space='_'), vol.Optional(CONF_RESTORE_MODE): cv.one_of(*RESTORE_MODES, upper=True, space='_'),
}).extend(cv.COMPONENT_SCHEMA.schema)) }).extend(cv.COMPONENT_SCHEMA.schema))