ESPHome  2024.11.2
output_button.h
Go to the documentation of this file.
1 #pragma once
2 
6 
7 namespace esphome {
8 namespace output {
9 
10 class OutputButton : public button::Button, public Component {
11  public:
12  void dump_config() override;
13 
14  void set_output(BinaryOutput *output) { output_ = output; }
15  void set_duration(uint32_t duration) { duration_ = duration; }
16 
17  protected:
18  void press_action() override;
19 
21  uint32_t duration_;
22 };
23 
24 } // namespace output
25 } // namespace esphome
void set_output(BinaryOutput *output)
Definition: output_button.h:14
Base class for all buttons.
Definition: button.h:29
output::BinaryOutput * output_
Definition: output_button.h:20
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
void set_duration(uint32_t duration)
Definition: output_button.h:15