mirror of
https://github.com/esphome/esphome.git
synced 2025-10-10 05:43:48 +01:00
add SUB_BUTTON macro and ability to button schema to define the class (#4450)
* add ability to button schema to define the class * add SUB_BUTTON macro
This commit is contained in:
@@ -16,10 +16,9 @@ CopyButton = copy_ns.class_("CopyButton", button.Button, cg.Component)
|
||||
|
||||
|
||||
CONFIG_SCHEMA = (
|
||||
button.button_schema()
|
||||
button.button_schema(CopyButton)
|
||||
.extend(
|
||||
{
|
||||
cv.GenerateID(): cv.declare_id(CopyButton),
|
||||
cv.Required(CONF_SOURCE_ID): cv.use_id(button.Button),
|
||||
}
|
||||
)
|
||||
|
Reference in New Issue
Block a user