mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-01 18:48:28 +02: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