ESPHome
2026.10.2
Loading...
Searching...
No Matches
esphome
components
text
automation.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/core/automation.h
"
4
#include "
esphome/core/component.h
"
5
#include "
text.h
"
6
7
namespace
esphome::text
{
8
9
class
TextStateTrigger
final :
public
Trigger
<std::string> {
10
public
:
11
explicit
TextStateTrigger
(
Text
*parent) {
12
parent->
add_on_state_callback
([
this
](
const
std::string &value) { this->
trigger
(value); });
13
}
14
};
15
16
}
// namespace esphome::text
esphome::Trigger
Definition
automation.h:523
esphome::Trigger< std::string >::trigger
void trigger(const Ts &...x) ESPHOME_ALWAYS_INLINE
Definition
automation.h:528
esphome::text::Text
Base-class for all text inputs.
Definition
text.h:21
esphome::text::Text::add_on_state_callback
void add_on_state_callback(F &&callback)
Definition
text.h:33
esphome::text::TextStateTrigger
Definition
automation.h:9
esphome::text::TextStateTrigger::TextStateTrigger
TextStateTrigger(Text *parent)
Definition
automation.h:11
component.h
automation.h
esphome::text
Definition
automation.h:7
text.h
Generated by
1.12.0