mirror of
https://github.com/esphome/esphome.git
synced 2025-09-18 19:22:22 +01:00
Simplify button_schema function (#4468)
This commit is contained in:
@@ -1,15 +1,10 @@
|
||||
import esphome.config_validation as cv
|
||||
from esphome.components import button
|
||||
|
||||
from .. import template_ns
|
||||
|
||||
TemplateButton = template_ns.class_("TemplateButton", button.Button)
|
||||
|
||||
CONFIG_SCHEMA = button.BUTTON_SCHEMA.extend(
|
||||
{
|
||||
cv.GenerateID(): cv.declare_id(TemplateButton),
|
||||
}
|
||||
)
|
||||
CONFIG_SCHEMA = button.button_schema(TemplateButton)
|
||||
|
||||
|
||||
async def to_code(config):
|
||||
|
Reference in New Issue
Block a user