mirror of
https://github.com/esphome/esphome.git
synced 2026-09-17 18:18:43 +00:00
[template] Use a user provided default constructor for TemplateButton (#19124)
This commit is contained in:
@@ -6,6 +6,9 @@ namespace esphome::template_ {
|
||||
|
||||
class TemplateButton final : public button::Button {
|
||||
public:
|
||||
// User provided, not "= default": `new(p) TemplateButton()` would zero-fill .bss that is already zero.
|
||||
TemplateButton() {}
|
||||
|
||||
// Implements the abstract `press_action` but the `on_press` trigger already handles the press.
|
||||
void press_action() override{};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user