ESPHome
2026.8.0-dev
Loading...
Searching...
No Matches
esphome
components
cst328
binary_sensor
cst328_button.cpp
Go to the documentation of this file.
1
#include "
cst328_button.h
"
2
#include "
esphome/core/log.h
"
3
4
namespace
esphome::cst328
{
5
static
const
char
*
const
TAG =
"cst328.binary_sensor"
;
6
7
void
CST328Button::setup
() {
8
this->
parent_
->register_button_listener(
this
);
9
this->
publish_initial_state
(
false
);
10
}
11
12
void
CST328Button::dump_config
() { LOG_BINARY_SENSOR(
""
,
"CST328 Button"
,
this
); }
13
14
void
CST328Button::update_button
(
bool
state
) { this->
publish_state
(state); }
15
16
}
// namespace esphome::cst328
esphome::Parented< CST328Touchscreen >::parent_
CST328Touchscreen * parent_
Definition
helpers.h:1886
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::cst328::CST328Button::setup
void setup() override
Definition
cst328_button.cpp:7
esphome::cst328::CST328Button::update_button
void update_button(bool state) override
Definition
cst328_button.cpp:14
esphome::cst328::CST328Button::dump_config
void dump_config() override
Definition
cst328_button.cpp:12
cst328_button.h
state
bool state
Definition
fan.h:2
log.h
esphome::cst328
Definition
cst328_button.cpp:4
Generated by
1.12.0