ESPHome
2026.6.0-dev
Loading...
Searching...
No Matches
esphome
components
cst226
binary_sensor
cstt6_button.cpp
Go to the documentation of this file.
1
#include "
cs226_button.h
"
2
#include "
esphome/core/log.h
"
3
4
namespace
esphome::cst226
{
5
6
static
const
char
*
const
TAG =
"CST226.binary_sensor"
;
7
8
void
CST226Button::setup
() {
9
this->
parent_
->register_button_listener(
this
);
10
this->
publish_initial_state
(
false
);
11
}
12
13
void
CST226Button::dump_config
() { LOG_BINARY_SENSOR(
""
,
"CST226 Button"
,
this
); }
14
15
void
CST226Button::update_button
(
bool
state
) { this->
publish_state
(state); }
16
17
}
// namespace esphome::cst226
esphome::Parented< CST226Touchscreen >::parent_
CST226Touchscreen * parent_
Definition
helpers.h:1872
esphome::binary_sensor::BinarySensor::publish_state
void publish_state(bool new_state)
Publish a new state to the front-end.
Definition
binary_sensor.cpp:20
esphome::binary_sensor::BinarySensor::publish_initial_state
void publish_initial_state(bool new_state)
Publish the initial state, this will not make the callback manager send callbacks and is meant only f...
Definition
binary_sensor.cpp:31
esphome::cst226::CST226Button::update_button
void update_button(bool state) override
Definition
cstt6_button.cpp:15
esphome::cst226::CST226Button::dump_config
void dump_config() override
Definition
cstt6_button.cpp:13
esphome::cst226::CST226Button::setup
void setup() override
Definition
cstt6_button.cpp:8
cs226_button.h
state
bool state
Definition
fan.h:2
log.h
esphome::cst226
Definition
cs226_button.h:7
Generated by
1.12.0