mirror of
https://github.com/esphome/esphome.git
synced 2025-10-24 04:33:49 +01: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:
@@ -216,6 +216,15 @@ class WebServer : public Controller, public Component, public AsyncWebHandler {
|
||||
std::string number_json(number::Number *obj, float value, JsonDetail start_config);
|
||||
#endif
|
||||
|
||||
#ifdef USE_TEXT
|
||||
void on_text_update(text::Text *obj, const std::string &state) override;
|
||||
/// Handle a text input request under '/text/<id>'.
|
||||
void handle_text_request(AsyncWebServerRequest *request, const UrlMatch &match);
|
||||
|
||||
/// Dump the text state with its value as a JSON string.
|
||||
std::string text_json(text::Text *obj, const std::string &value, JsonDetail start_config);
|
||||
#endif
|
||||
|
||||
#ifdef USE_SELECT
|
||||
void on_select_update(select::Select *obj, const std::string &state, size_t index) override;
|
||||
/// Handle a select request under '/select/<id>'.
|
||||
|
||||
Reference in New Issue
Block a user