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
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ PLATFORM_SCHEMA = cv.nameable(switch.SWITCH_PLATFORM_SCHEMA.extend({
cv.GenerateID(): cv.declare_variable_id(GPIOSwitch),
cv.GenerateID(CONF_MAKE_ID): cv.declare_variable_id(MakeGPIOSwitch),
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))