mirror of
https://github.com/esphome/esphome.git
synced 2025-10-29 22:24:26 +00:00
Add support for button entities (#2824)
This commit is contained in:
13
esphome/components/template/button/__init__.py
Normal file
13
esphome/components/template/button/__init__.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import esphome.config_validation as cv
|
||||
from esphome.components import button
|
||||
|
||||
|
||||
CONFIG_SCHEMA = button.BUTTON_SCHEMA.extend(
|
||||
{
|
||||
cv.GenerateID(): cv.declare_id(button.Button),
|
||||
}
|
||||
).extend(cv.COMPONENT_SCHEMA)
|
||||
|
||||
|
||||
async def to_code(config):
|
||||
await button.new_button(config)
|
||||
Reference in New Issue
Block a user