mirror of
https://github.com/esphome/esphome.git
synced 2024-11-22 11:47:30 +01:00
GPIO Switch Fix restore_mode validator (#296)
This commit is contained in:
parent
4948ad95b0
commit
1d0c812e44
@ -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))
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user