1
0
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:
Jesse Hills
2021-11-30 08:00:51 +13:00
committed by GitHub
parent f50e40e0b8
commit b5639a6472
34 changed files with 697 additions and 0 deletions

View 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)