ESPHome
2026.11.0-dev
Loading...
Searching...
No Matches
esphome
components
template
button
template_button.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/components/button/button.h
"
4
5
namespace
esphome::template_
{
6
7
class
TemplateButton
final :
public
button::Button
{
8
public
:
9
// User provided, not "= default": `new(p) TemplateButton()` would zero-fill .bss that is already zero.
10
TemplateButton
() {}
11
12
// Implements the abstract `press_action` but the `on_press` trigger already handles the press.
13
void
press_action
()
override
{};
14
};
15
16
}
// namespace esphome::template_
button.h
esphome::button::Button
Base class for all buttons.
Definition
button.h:25
esphome::template_::TemplateButton
Definition
template_button.h:7
esphome::template_::TemplateButton::TemplateButton
TemplateButton()
Definition
template_button.h:10
esphome::template_::TemplateButton::press_action
void press_action() override
Definition
template_button.h:13
esphome::template_
Definition
template_alarm_control_panel.cpp:10
Generated by
1.12.0