mirror of
https://github.com/esphome/esphome.git
synced 2025-10-06 11:53:45 +01:00
Tidy up switch schemas (#3754)
This commit is contained in:
@@ -10,13 +10,7 @@ CONFIG_SCHEMA = cv.Schema(
|
||||
{
|
||||
cv.GenerateID(): cv.declare_id(CustomSwitchConstructor),
|
||||
cv.Required(CONF_LAMBDA): cv.returning_lambda,
|
||||
cv.Required(CONF_SWITCHES): cv.ensure_list(
|
||||
switch.SWITCH_SCHEMA.extend(
|
||||
{
|
||||
cv.GenerateID(): cv.declare_id(switch.Switch),
|
||||
}
|
||||
)
|
||||
),
|
||||
cv.Required(CONF_SWITCHES): cv.ensure_list(switch.switch_schema(switch.Switch)),
|
||||
}
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user