mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-25 15:18:29 +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:
@@ -82,6 +82,13 @@ bool ListEntitiesIterator::on_number(number::Number *number) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef USE_TEXT
|
||||
bool ListEntitiesIterator::on_text(text::Text *text) {
|
||||
this->web_server_->events_.send(this->web_server_->text_json(text, text->state, DETAIL_ALL).c_str(), "state");
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef USE_SELECT
|
||||
bool ListEntitiesIterator::on_select(select::Select *select) {
|
||||
this->web_server_->events_.send(this->web_server_->select_json(select, select->state, DETAIL_ALL).c_str(), "state");
|
||||
|
||||
Reference in New Issue
Block a user