mirror of
https://github.com/esphome/esphome.git
synced 2025-10-30 06:33:51 +00:00
Tidy up switch schemas (#3754)
This commit is contained in:
@@ -17,11 +17,7 @@ CODEOWNERS = ["@senexcrenshaw"]
|
||||
NextionSwitch = nextion_ns.class_("NextionSwitch", switch.Switch, cg.PollingComponent)
|
||||
|
||||
CONFIG_SCHEMA = cv.All(
|
||||
switch.SWITCH_SCHEMA.extend(
|
||||
{
|
||||
cv.GenerateID(): cv.declare_id(NextionSwitch),
|
||||
}
|
||||
)
|
||||
switch.switch_schema(NextionSwitch)
|
||||
.extend(CONFIG_SWITCH_COMPONENT_SCHEMA)
|
||||
.extend(cv.polling_component_schema("never")),
|
||||
cv.has_exactly_one_key(CONF_COMPONENT_NAME, CONF_VARIABLE_NAME),
|
||||
|
||||
Reference in New Issue
Block a user