mirror of
https://github.com/esphome/esphome.git
synced 2025-10-24 04:33:49 +01:00
Add select entities and implement template select (#2067)
Co-authored-by: Otto Winter <otto@otto-winter.com>
This commit is contained in:
@@ -163,6 +163,15 @@ class WebServer : public Controller, public Component, public AsyncWebHandler {
|
||||
std::string number_json(number::Number *obj, float value);
|
||||
#endif
|
||||
|
||||
#ifdef USE_SELECT
|
||||
void on_select_update(select::Select *obj, const std::string &state) override;
|
||||
/// Handle a select request under '/select/<id>'.
|
||||
void handle_select_request(AsyncWebServerRequest *request, const UrlMatch &match);
|
||||
|
||||
/// Dump the number state with its value as a JSON string.
|
||||
std::string select_json(select::Select *obj, const std::string &value);
|
||||
#endif
|
||||
|
||||
/// Override the web handler's canHandle method.
|
||||
bool canHandle(AsyncWebServerRequest *request) override;
|
||||
/// Override the web handler's handleRequest method.
|
||||
|
||||
Reference in New Issue
Block a user