ESPHome 2026.5.1
Loading...
Searching...
No Matches
demo_text.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace esphome::demo {
7
8class DemoText : public text::Text, public Component {
9 public:
10 void setup() override { this->publish_state("I am a text entity"); }
11
12 protected:
13 void control(const std::string &value) override { this->publish_state(value); }
14};
15
16} // namespace esphome::demo
void setup() override
Definition demo_text.h:10
void control(const std::string &value) override
Definition demo_text.h:13
Base-class for all text inputs.
Definition text.h:21
void publish_state(const std::string &state)
Definition text.cpp:11