mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-03 19:38:30 +02:00
Add text component (#5336)
Co-authored-by: Maurits <maurits@vloop.nl> Co-authored-by: mauritskorse <mauritskorse@gmail.com> Co-authored-by: Daniel Dunn <dannydunn@eternityforest.com> Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "text_traits.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace text {
|
||||
|
||||
class Text;
|
||||
|
||||
class TextCall {
|
||||
public:
|
||||
explicit TextCall(Text *parent) : parent_(parent) {}
|
||||
void perform();
|
||||
|
||||
TextCall &set_value(const std::string &value);
|
||||
|
||||
protected:
|
||||
Text *const parent_;
|
||||
optional<std::string> value_;
|
||||
void validate_();
|
||||
};
|
||||
|
||||
} // namespace text
|
||||
} // namespace esphome
|
||||
Reference in New Issue
Block a user