ESPHome
2026.5.1
Loading...
Searching...
No Matches
esphome
components
gt911
binary_sensor
gt911_button.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/components/binary_sensor/binary_sensor.h
"
4
#include "
esphome/components/gt911/touchscreen/gt911_touchscreen.h
"
5
#include "
esphome/core/component.h
"
6
#include "
esphome/core/helpers.h
"
7
8
namespace
esphome::gt911
{
9
10
class
GT911Button
:
public
binary_sensor::BinarySensor
,
11
public
Component
,
12
public
GT911ButtonListener
,
13
public
Parented
<GT911Touchscreen> {
14
public
:
15
void
setup
()
override
;
16
void
dump_config
()
override
;
17
18
void
set_index
(uint8_t index) { this->
index_
= index; }
19
20
void
update_button
(uint8_t index,
bool
state
)
override
;
21
22
protected
:
23
uint8_t
index_
;
24
};
25
26
}
// namespace esphome::gt911
binary_sensor.h
esphome::Component
Definition
component.h:145
esphome::Parented
Helper class to easily give an object a parent of type T.
Definition
helpers.h:1861
esphome::binary_sensor::BinarySensor
Base class for all binary_sensor-type classes.
Definition
binary_sensor.h:33
esphome::binary_sensor::BinarySensor::state
bool state
The current state of this binary sensor. Also used as the backing storage for StatefulEntityBase.
Definition
binary_sensor.h:71
esphome::gt911::GT911Button
Definition
gt911_button.h:13
esphome::gt911::GT911Button::setup
void setup() override
Definition
gt911_button.cpp:8
esphome::gt911::GT911Button::update_button
void update_button(uint8_t index, bool state) override
Definition
gt911_button.cpp:18
esphome::gt911::GT911Button::dump_config
void dump_config() override
Definition
gt911_button.cpp:13
esphome::gt911::GT911Button::set_index
void set_index(uint8_t index)
Definition
gt911_button.h:18
esphome::gt911::GT911Button::index_
uint8_t index_
Definition
gt911_button.h:23
esphome::gt911::GT911ButtonListener
Definition
gt911_touchscreen.h:10
component.h
gt911_touchscreen.h
helpers.h
esphome::gt911
Definition
gt911_button.cpp:4
Generated by
1.12.0