ESPHome
2024.11.1
esphome
esphome
components
output
button
output_button.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/core/component.h
"
4
#include "
esphome/components/button/button.h
"
5
#include "
esphome/components/output/binary_output.h
"
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
20
output::BinaryOutput
*
output_
;
21
uint32_t
duration_
;
22
};
23
24
}
// namespace output
25
}
// namespace esphome
esphome::output::OutputButton::press_action
void press_action() override
Definition:
output_button.cpp:13
esphome::output::OutputButton::set_output
void set_output(BinaryOutput *output)
Definition:
output_button.h:14
esphome::button::Button
Base class for all buttons.
Definition:
button.h:29
esphome::Component
Definition:
component.h:68
binary_output.h
button.h
esphome::output::OutputButton::dump_config
void dump_config() override
Definition:
output_button.cpp:9
esphome::output::OutputButton
Definition:
output_button.h:10
esphome::output::BinaryOutput
Definition:
binary_output.h:18
esphome::output::OutputButton::output_
output::BinaryOutput * output_
Definition:
output_button.h:20
esphome
Implementation of SPI Controller mode.
Definition:
a01nyub.cpp:7
component.h
esphome::output::OutputButton::set_duration
void set_duration(uint32_t duration)
Definition:
output_button.h:15
esphome::output::OutputButton::duration_
uint32_t duration_
Definition:
output_button.h:21
Generated by
1.8.13