|
ESPHome 2026.1.0-dev
|
This class allows users to create a web server with their ESP nodes. More...
#include <web_server.h>
Public Member Functions | |
| WebServer (web_server_base::WebServerBase *base) | |
| void | set_css_url (const char *css_url) |
| Set the URL to the CSS <link> that's sent to each client. | |
| void | set_js_url (const char *js_url) |
| Set the URL to the script that's embedded in the index page. | |
| void | set_css_include (const char *css_include) |
| Set local path to the script that's embedded in the index page. | |
| void | set_js_include (const char *js_include) |
| Set local path to the script that's embedded in the index page. | |
| void | set_include_internal (bool include_internal) |
| Determine whether internal components should be displayed on the web server. | |
| void | set_expose_log (bool expose_log) |
| Set whether or not the webserver should expose the Log. | |
| void | setup () override |
| Setup the internal web server and register handlers. | |
| void | loop () override |
| void | dump_config () override |
| void | on_log (uint8_t level, const char *tag, const char *message, size_t message_len) override |
| float | get_setup_priority () const override |
| MQTT setup priority. | |
| void | handle_index_request (AsyncWebServerRequest *request) |
| Handle an index request under '/'. | |
| std::string | get_config_json () |
| Return the webserver configuration as JSON. | |
| void | handle_css_request (AsyncWebServerRequest *request) |
| Handle included css request under '/0.css'. | |
| void | handle_js_request (AsyncWebServerRequest *request) |
| Handle included js request under '/0.js'. | |
| void | handle_pna_cors_request (AsyncWebServerRequest *request) |
| void | on_sensor_update (sensor::Sensor *obj) override |
| void | handle_sensor_request (AsyncWebServerRequest *request, const UrlMatch &match) |
| Handle a sensor request under '/sensor/<id>'. | |
| void | on_switch_update (switch_::Switch *obj) override |
| void | handle_switch_request (AsyncWebServerRequest *request, const UrlMatch &match) |
| Handle a switch request under '/switch/<id>/</turn_on/turn_off/toggle>'. | |
| void | handle_button_request (AsyncWebServerRequest *request, const UrlMatch &match) |
| Handle a button request under '/button/<id>/press'. | |
| void | on_binary_sensor_update (binary_sensor::BinarySensor *obj) override |
| void | handle_binary_sensor_request (AsyncWebServerRequest *request, const UrlMatch &match) |
| Handle a binary sensor request under '/binary_sensor/<id>'. | |
| void | on_fan_update (fan::Fan *obj) override |
| void | handle_fan_request (AsyncWebServerRequest *request, const UrlMatch &match) |
| Handle a fan request under '/fan/<id>/</turn_on/turn_off/toggle>'. | |
| void | on_light_update (light::LightState *obj) override |
| void | handle_light_request (AsyncWebServerRequest *request, const UrlMatch &match) |
| Handle a light request under '/light/<id>/</turn_on/turn_off/toggle>'. | |
| void | on_text_sensor_update (text_sensor::TextSensor *obj) override |
| void | handle_text_sensor_request (AsyncWebServerRequest *request, const UrlMatch &match) |
| Handle a text sensor request under '/text_sensor/<id>'. | |
| void | on_cover_update (cover::Cover *obj) override |
| void | handle_cover_request (AsyncWebServerRequest *request, const UrlMatch &match) |
| Handle a cover request under '/cover/<id>/<open/close/stop/set>'. | |
| void | on_number_update (number::Number *obj) override |
| void | handle_number_request (AsyncWebServerRequest *request, const UrlMatch &match) |
| Handle a number request under '/number/<id>'. | |
| void | on_date_update (datetime::DateEntity *obj) override |
| void | handle_date_request (AsyncWebServerRequest *request, const UrlMatch &match) |
| Handle a date request under '/date/<id>'. | |
| void | on_time_update (datetime::TimeEntity *obj) override |
| void | handle_time_request (AsyncWebServerRequest *request, const UrlMatch &match) |
| Handle a time request under '/time/<id>'. | |
| void | on_datetime_update (datetime::DateTimeEntity *obj) override |
| void | handle_datetime_request (AsyncWebServerRequest *request, const UrlMatch &match) |
| Handle a datetime request under '/datetime/<id>'. | |
| void | on_text_update (text::Text *obj) override |
| void | handle_text_request (AsyncWebServerRequest *request, const UrlMatch &match) |
| Handle a text input request under '/text/<id>'. | |
| void | on_select_update (select::Select *obj) override |
| void | handle_select_request (AsyncWebServerRequest *request, const UrlMatch &match) |
| Handle a select request under '/select/<id>'. | |
| void | on_climate_update (climate::Climate *obj) override |
| void | handle_climate_request (AsyncWebServerRequest *request, const UrlMatch &match) |
| Handle a climate request under '/climate/<id>'. | |
| void | on_lock_update (lock::Lock *obj) override |
| void | handle_lock_request (AsyncWebServerRequest *request, const UrlMatch &match) |
| Handle a lock request under '/lock/<id>/</lock/unlock/open>'. | |
| void | on_valve_update (valve::Valve *obj) override |
| void | handle_valve_request (AsyncWebServerRequest *request, const UrlMatch &match) |
| Handle a valve request under '/valve/<id>/<open/close/stop/set>'. | |
| void | on_alarm_control_panel_update (alarm_control_panel::AlarmControlPanel *obj) override |
| void | handle_alarm_control_panel_request (AsyncWebServerRequest *request, const UrlMatch &match) |
| Handle a alarm_control_panel request under '/alarm_control_panel/<id>'. | |
| void | on_event (event::Event *obj) override |
| void | handle_event_request (AsyncWebServerRequest *request, const UrlMatch &match) |
| Handle a event request under '/event<id>'. | |
| void | on_update (update::UpdateEntity *obj) override |
| void | handle_update_request (AsyncWebServerRequest *request, const UrlMatch &match) |
| Handle a update request under '/update/<id>'. | |
| bool | canHandle (AsyncWebServerRequest *request) const override |
| Override the web handler's canHandle method. | |
| void | handleRequest (AsyncWebServerRequest *request) override |
| Override the web handler's handleRequest method. | |
| bool | isRequestHandlerTrivial () const override |
| This web handle is not trivial. | |
| void | add_entity_config (EntityBase *entity, float weight, uint64_t group) |
| void | add_sorting_group (uint64_t group_id, const std::string &group_name, float weight) |
Public Member Functions inherited from esphome::Controller | |
| virtual void | on_media_player_update (media_player::MediaPlayer *obj) |
| virtual void | on_water_heater_update (water_heater::WaterHeater *obj) |
Public Member Functions inherited from esphome::Component | |
| float | get_actual_setup_priority () const |
| void | set_setup_priority (float priority) |
| virtual float | get_loop_priority () const |
| priority of loop(). | |
| void | call () |
| virtual void | on_shutdown () |
| virtual void | on_safe_shutdown () |
| virtual bool | teardown () |
| Called during teardown to allow component to gracefully finish operations. | |
| virtual void | on_powerdown () |
| Called after teardown is complete to power down hardware. | |
| uint8_t | get_component_state () const |
| void | reset_to_construction_state () |
| Reset this component back to the construction state to allow setup to run again. | |
| bool | is_in_loop_state () const |
| Check if this component has completed setup and is in the loop state. | |
| bool | is_idle () const |
| Check if this component is idle. | |
| virtual void | mark_failed () |
| Mark this component as failed. | |
| ESPDEPRECATED ("Use mark_failed(LOG_STR(\"static string literal\")) instead. Do NOT use .c_str() from temporary " "strings. Will stop working in 2026.6.0", "2025.12.0") void mark_failed(const char *message) | |
| void | mark_failed (const LogString *message) |
| void | disable_loop () |
| Disable this component's loop. | |
| void | enable_loop () |
| Enable this component's loop. | |
| void | enable_loop_soon_any_context () |
| Thread and ISR-safe version of enable_loop() that can be called from any context. | |
| bool | is_failed () const |
| bool | is_ready () const |
| virtual bool | can_proceed () |
| bool | status_has_warning () const |
| bool | status_has_error () const |
| void | status_set_warning (const char *message=nullptr) |
| void | status_set_warning (const LogString *message) |
| void | status_set_error () |
| ESPDEPRECATED ("Use status_set_error(LOG_STR(\"static string literal\")) instead. Do NOT use .c_str() from temporary " "strings. Will stop working in 2026.6.0", "2025.12.0") void status_set_error(const char *message) | |
| void | status_set_error (const LogString *message) |
| void | status_clear_warning () |
| void | status_clear_error () |
| void | status_momentary_warning (const char *name, uint32_t length=5000) |
| Set warning status flag and automatically clear it after a timeout. | |
| void | status_momentary_error (const char *name, uint32_t length=5000) |
| Set error status flag and automatically clear it after a timeout. | |
| bool | has_overridden_loop () const |
| void | set_component_source (const LogString *source) |
| Set where this component was loaded from for some debug messages. | |
| const LogString * | get_component_log_str () const |
| Get the integration where this component was declared as a LogString for logging. | |
| bool | should_warn_of_blocking (uint32_t blocking_time) |
Public Member Functions inherited from esphome::logger::LogListener | |
Static Public Member Functions | |
| static std::string | sensor_state_json_generator (WebServer *web_server, void *source) |
| static std::string | sensor_all_json_generator (WebServer *web_server, void *source) |
| static std::string | switch_state_json_generator (WebServer *web_server, void *source) |
| static std::string | switch_all_json_generator (WebServer *web_server, void *source) |
| static std::string | button_state_json_generator (WebServer *web_server, void *source) |
| static std::string | button_all_json_generator (WebServer *web_server, void *source) |
| static std::string | binary_sensor_state_json_generator (WebServer *web_server, void *source) |
| static std::string | binary_sensor_all_json_generator (WebServer *web_server, void *source) |
| static std::string | fan_state_json_generator (WebServer *web_server, void *source) |
| static std::string | fan_all_json_generator (WebServer *web_server, void *source) |
| static std::string | light_state_json_generator (WebServer *web_server, void *source) |
| static std::string | light_all_json_generator (WebServer *web_server, void *source) |
| static std::string | text_sensor_state_json_generator (WebServer *web_server, void *source) |
| static std::string | text_sensor_all_json_generator (WebServer *web_server, void *source) |
| static std::string | cover_state_json_generator (WebServer *web_server, void *source) |
| static std::string | cover_all_json_generator (WebServer *web_server, void *source) |
| static std::string | number_state_json_generator (WebServer *web_server, void *source) |
| static std::string | number_all_json_generator (WebServer *web_server, void *source) |
| static std::string | date_state_json_generator (WebServer *web_server, void *source) |
| static std::string | date_all_json_generator (WebServer *web_server, void *source) |
| static std::string | time_state_json_generator (WebServer *web_server, void *source) |
| static std::string | time_all_json_generator (WebServer *web_server, void *source) |
| static std::string | datetime_state_json_generator (WebServer *web_server, void *source) |
| static std::string | datetime_all_json_generator (WebServer *web_server, void *source) |
| static std::string | text_state_json_generator (WebServer *web_server, void *source) |
| static std::string | text_all_json_generator (WebServer *web_server, void *source) |
| static std::string | select_state_json_generator (WebServer *web_server, void *source) |
| static std::string | select_all_json_generator (WebServer *web_server, void *source) |
| static std::string | climate_state_json_generator (WebServer *web_server, void *source) |
| static std::string | climate_all_json_generator (WebServer *web_server, void *source) |
| static std::string | lock_state_json_generator (WebServer *web_server, void *source) |
| static std::string | lock_all_json_generator (WebServer *web_server, void *source) |
| static std::string | valve_state_json_generator (WebServer *web_server, void *source) |
| static std::string | valve_all_json_generator (WebServer *web_server, void *source) |
| static std::string | alarm_control_panel_state_json_generator (WebServer *web_server, void *source) |
| static std::string | alarm_control_panel_all_json_generator (WebServer *web_server, void *source) |
| static std::string | event_state_json_generator (WebServer *web_server, void *source) |
| static std::string | event_all_json_generator (WebServer *web_server, void *source) |
| static std::string | update_state_json_generator (WebServer *web_server, void *source) |
| static std::string | update_all_json_generator (WebServer *web_server, void *source) |
Data Fields | |
| std::map< EntityBase *, SortingComponents > | sorting_entitys_ |
| std::map< uint64_t, SortingGroup > | sorting_groups_ |
| bool | include_internal_ {false} |
Protected Member Functions | |
| void | add_sorting_info_ (JsonObject &root, EntityBase *entity) |
| template<typename T , typename Ret > | |
| void | parse_light_param_ (AsyncWebServerRequest *request, const char *param_name, T &call, Ret(T::*setter)(float), float scale=1.0f) |
| template<typename T , typename Ret > | |
| void | parse_light_param_uint_ (AsyncWebServerRequest *request, const char *param_name, T &call, Ret(T::*setter)(uint32_t), uint32_t scale=1) |
| template<typename T , typename Ret > | |
| void | parse_float_param_ (AsyncWebServerRequest *request, const char *param_name, T &call, Ret(T::*setter)(float)) |
| template<typename T , typename Ret > | |
| void | parse_int_param_ (AsyncWebServerRequest *request, const char *param_name, T &call, Ret(T::*setter)(int)) |
| template<typename T , typename Ret > | |
| void | parse_string_param_ (AsyncWebServerRequest *request, const char *param_name, T &call, Ret(T::*setter)(const std::string &)) |
Protected Member Functions inherited from esphome::Component | |
| virtual void | call_loop () |
| virtual void | call_setup () |
| virtual void | call_dump_config () |
| void | set_component_state_ (uint8_t state) |
| Helper to set component state (clears state bits and sets new state) | |
| void | set_interval (const std::string &name, uint32_t interval, std::function< void()> &&f) |
| Set an interval function with a unique name. | |
| void | set_interval (const char *name, uint32_t interval, std::function< void()> &&f) |
| Set an interval function with a const char* name. | |
| void | set_interval (uint32_t interval, std::function< void()> &&f) |
| bool | cancel_interval (const std::string &name) |
| Cancel an interval function. | |
| bool | cancel_interval (const char *name) |
| void | set_retry (const std::string &name, uint32_t initial_wait_time, uint8_t max_attempts, std::function< RetryResult(uint8_t)> &&f, float backoff_increase_factor=1.0f) |
| Set an retry function with a unique name. | |
| void | set_retry (const char *name, uint32_t initial_wait_time, uint8_t max_attempts, std::function< RetryResult(uint8_t)> &&f, float backoff_increase_factor=1.0f) |
| void | set_retry (uint32_t initial_wait_time, uint8_t max_attempts, std::function< RetryResult(uint8_t)> &&f, float backoff_increase_factor=1.0f) |
| bool | cancel_retry (const std::string &name) |
| Cancel a retry function. | |
| bool | cancel_retry (const char *name) |
| void | set_timeout (const std::string &name, uint32_t timeout, std::function< void()> &&f) |
| Set a timeout function with a unique name. | |
| void | set_timeout (const char *name, uint32_t timeout, std::function< void()> &&f) |
| Set a timeout function with a const char* name. | |
| void | set_timeout (uint32_t timeout, std::function< void()> &&f) |
| bool | cancel_timeout (const std::string &name) |
| Cancel a timeout function. | |
| bool | cancel_timeout (const char *name) |
| void | defer (const std::string &name, std::function< void()> &&f) |
| Defer a callback to the next loop() call. | |
| void | defer (const char *name, std::function< void()> &&f) |
| Defer a callback to the next loop() call with a const char* name. | |
| void | defer (std::function< void()> &&f) |
| Defer a callback to the next loop() call. | |
| bool | cancel_defer (const std::string &name) |
| Cancel a defer callback using the specified name, name must not be empty. | |
Protected Attributes | |
| web_server_base::WebServerBase * | base_ |
| AsyncEventSource | events_ {"/events", this} |
| DeferredUpdateEventSourceList | events_ |
| const char * | css_url_ {nullptr} |
| const char * | js_url_ {nullptr} |
| const char * | css_include_ {nullptr} |
| const char * | js_include_ {nullptr} |
| bool | expose_log_ {true} |
Protected Attributes inherited from esphome::Component | |
| const LogString * | component_source_ {nullptr} |
| uint16_t | warn_if_blocking_over_ {WARN_IF_BLOCKING_OVER_MS} |
| Warn if blocked for this many ms (max 65.5s) | |
| uint8_t | component_state_ {0x00} |
| State of this component - each bit has a purpose: Bits 0-2: Component state (0x00=CONSTRUCTION, 0x01=SETUP, 0x02=LOOP, 0x03=FAILED, 0x04=LOOP_DONE) Bit 3: STATUS_LED_WARNING Bit 4: STATUS_LED_ERROR Bits 5-7: Unused - reserved for future expansion. | |
| volatile bool | pending_enable_loop_ {false} |
| ISR-safe flag for enable_loop_soon_any_context. | |
This class allows users to create a web server with their ESP nodes.
Behind the scenes it's using AsyncWebServer to set up the server. It exposes 3 things: an index page under '/' that's used to show a simple web interface (the css/js is hosted by esphome.io by default), an event source under '/events' that automatically sends all state updates in real time + the debug log. Lastly, there's an REST API available under the '/light/...', '/sensor/...', ... URLs. A full documentation for this API can be found under https://esphome.io/web-api/.
Definition at line 171 of file web_server.h.
| esphome::web_server::WebServer::WebServer | ( | web_server_base::WebServerBase * | base | ) |
Definition at line 268 of file web_server.cpp.
| void esphome::web_server::WebServer::add_entity_config | ( | EntityBase * | entity, |
| float | weight, | ||
| uint64_t | group ) |
Definition at line 2098 of file web_server.cpp.
| void esphome::web_server::WebServer::add_sorting_group | ( | uint64_t | group_id, |
| const std::string & | group_name, | ||
| float | weight ) |
Definition at line 2102 of file web_server.cpp.
|
protected |
Definition at line 2086 of file web_server.cpp.
|
static |
Definition at line 1662 of file web_server.cpp.
|
static |
Definition at line 1657 of file web_server.cpp.
|
static |
Definition at line 664 of file web_server.cpp.
|
static |
Definition at line 660 of file web_server.cpp.
|
static |
Definition at line 624 of file web_server.cpp.
|
static |
Definition at line 621 of file web_server.cpp.
|
override |
Override the web handler's canHandle method.
Definition at line 1812 of file web_server.cpp.
|
static |
Definition at line 1341 of file web_server.cpp.
|
static |
Definition at line 1337 of file web_server.cpp.
|
static |
Definition at line 903 of file web_server.cpp.
|
static |
Definition at line 900 of file web_server.cpp.
|
static |
Definition at line 1034 of file web_server.cpp.
|
static |
Definition at line 1031 of file web_server.cpp.
|
static |
Definition at line 1158 of file web_server.cpp.
|
static |
Definition at line 1155 of file web_server.cpp.
|
overridevirtual |
Reimplemented from esphome::Component.
Definition at line 328 of file web_server.cpp.
|
static |
Definition at line 1717 of file web_server.cpp.
|
static |
Definition at line 1712 of file web_server.cpp.
|
static |
Definition at line 738 of file web_server.cpp.
|
static |
Definition at line 735 of file web_server.cpp.
| std::string esphome::web_server::WebServer::get_config_json | ( | ) |
Return the webserver configuration as JSON.
Definition at line 277 of file web_server.cpp.
|
overridevirtual |
MQTT setup priority.
Reimplemented from esphome::Component.
Definition at line 334 of file web_server.cpp.
| void esphome::web_server::WebServer::handle_alarm_control_panel_request | ( | AsyncWebServerRequest * | request, |
| const UrlMatch & | match ) |
Handle a alarm_control_panel request under '/alarm_control_panel/<id>'.
Definition at line 1610 of file web_server.cpp.
| void esphome::web_server::WebServer::handle_binary_sensor_request | ( | AsyncWebServerRequest * | request, |
| const UrlMatch & | match ) |
Handle a binary sensor request under '/binary_sensor/<id>'.
Definition at line 646 of file web_server.cpp.
| void esphome::web_server::WebServer::handle_button_request | ( | AsyncWebServerRequest * | request, |
| const UrlMatch & | match ) |
Handle a button request under '/button/<id>/press'.
Definition at line 602 of file web_server.cpp.
| void esphome::web_server::WebServer::handle_climate_request | ( | AsyncWebServerRequest * | request, |
| const UrlMatch & | match ) |
Handle a climate request under '/climate/<id>'.
Definition at line 1302 of file web_server.cpp.
| void esphome::web_server::WebServer::handle_cover_request | ( | AsyncWebServerRequest * | request, |
| const UrlMatch & | match ) |
Handle a cover request under '/cover/<id>/<open/close/stop/set>'.
Definition at line 845 of file web_server.cpp.
| void esphome::web_server::WebServer::handle_css_request | ( | AsyncWebServerRequest * | request | ) |
Handle included css request under '/0.css'.
Definition at line 372 of file web_server.cpp.
| void esphome::web_server::WebServer::handle_date_request | ( | AsyncWebServerRequest * | request, |
| const UrlMatch & | match ) |
Handle a date request under '/date/<id>'.
Definition at line 1000 of file web_server.cpp.
| void esphome::web_server::WebServer::handle_datetime_request | ( | AsyncWebServerRequest * | request, |
| const UrlMatch & | match ) |
Handle a datetime request under '/datetime/<id>'.
Definition at line 1125 of file web_server.cpp.
| void esphome::web_server::WebServer::handle_event_request | ( | AsyncWebServerRequest * | request, |
| const UrlMatch & | match ) |
Handle a event request under '/event<id>'.
Definition at line 1691 of file web_server.cpp.
| void esphome::web_server::WebServer::handle_fan_request | ( | AsyncWebServerRequest * | request, |
| const UrlMatch & | match ) |
Handle a fan request under '/fan/<id>/</turn_on/turn_off/toggle>'.
Definition at line 687 of file web_server.cpp.
| void esphome::web_server::WebServer::handle_index_request | ( | AsyncWebServerRequest * | request | ) |
Handle an index request under '/'.
Definition at line 337 of file web_server.cpp.
| void esphome::web_server::WebServer::handle_js_request | ( | AsyncWebServerRequest * | request | ) |
Handle included js request under '/0.js'.
Definition at line 386 of file web_server.cpp.
| void esphome::web_server::WebServer::handle_light_request | ( | AsyncWebServerRequest * | request, |
| const UrlMatch & | match ) |
Handle a light request under '/light/<id>/</turn_on/turn_off/toggle>'.
Definition at line 767 of file web_server.cpp.
| void esphome::web_server::WebServer::handle_lock_request | ( | AsyncWebServerRequest * | request, |
| const UrlMatch & | match ) |
Handle a lock request under '/lock/<id>/</lock/unlock/open>'.
Definition at line 1452 of file web_server.cpp.
| void esphome::web_server::WebServer::handle_number_request | ( | AsyncWebServerRequest * | request, |
| const UrlMatch & | match ) |
Handle a number request under '/number/<id>'.
Definition at line 933 of file web_server.cpp.
| void esphome::web_server::WebServer::handle_pna_cors_request | ( | AsyncWebServerRequest * | request | ) |
Definition at line 361 of file web_server.cpp.
| void esphome::web_server::WebServer::handle_select_request | ( | AsyncWebServerRequest * | request, |
| const UrlMatch & | match ) |
Handle a select request under '/select/<id>'.
Definition at line 1245 of file web_server.cpp.
| void esphome::web_server::WebServer::handle_sensor_request | ( | AsyncWebServerRequest * | request, |
| const UrlMatch & | match ) |
Handle a sensor request under '/sensor/<id>'.
Definition at line 445 of file web_server.cpp.
| void esphome::web_server::WebServer::handle_switch_request | ( | AsyncWebServerRequest * | request, |
| const UrlMatch & | match ) |
Handle a switch request under '/switch/<id>/</turn_on/turn_off/toggle>'.
Definition at line 533 of file web_server.cpp.
| void esphome::web_server::WebServer::handle_text_request | ( | AsyncWebServerRequest * | request, |
| const UrlMatch & | match ) |
Handle a text input request under '/text/<id>'.
Definition at line 1189 of file web_server.cpp.
| void esphome::web_server::WebServer::handle_text_sensor_request | ( | AsyncWebServerRequest * | request, |
| const UrlMatch & | match ) |
Handle a text sensor request under '/text_sensor/<id>'.
Definition at line 491 of file web_server.cpp.
| void esphome::web_server::WebServer::handle_time_request | ( | AsyncWebServerRequest * | request, |
| const UrlMatch & | match ) |
Handle a time request under '/time/<id>'.
Definition at line 1063 of file web_server.cpp.
| void esphome::web_server::WebServer::handle_update_request | ( | AsyncWebServerRequest * | request, |
| const UrlMatch & | match ) |
Handle a update request under '/update/<id>'.
Definition at line 1760 of file web_server.cpp.
| void esphome::web_server::WebServer::handle_valve_request | ( | AsyncWebServerRequest * | request, |
| const UrlMatch & | match ) |
Handle a valve request under '/valve/<id>/<open/close/stop/set>'.
Definition at line 1526 of file web_server.cpp.
|
override |
Override the web handler's handleRequest method.
Definition at line 1938 of file web_server.cpp.
|
override |
This web handle is not trivial.
Definition at line 2084 of file web_server.cpp.
|
static |
Definition at line 816 of file web_server.cpp.
|
static |
Definition at line 813 of file web_server.cpp.
|
static |
Definition at line 1503 of file web_server.cpp.
|
static |
Definition at line 1500 of file web_server.cpp.
|
overridevirtual |
Reimplemented from esphome::Component.
Definition at line 317 of file web_server.cpp.
|
static |
Definition at line 962 of file web_server.cpp.
|
static |
Definition at line 959 of file web_server.cpp.
|
overridevirtual |
Reimplemented from esphome::Controller.
Definition at line 1605 of file web_server.cpp.
|
overridevirtual |
Reimplemented from esphome::Controller.
Definition at line 641 of file web_server.cpp.
|
overridevirtual |
Reimplemented from esphome::Controller.
Definition at line 1297 of file web_server.cpp.
|
overridevirtual |
Reimplemented from esphome::Controller.
Definition at line 840 of file web_server.cpp.
|
overridevirtual |
Reimplemented from esphome::Controller.
Definition at line 995 of file web_server.cpp.
|
overridevirtual |
Reimplemented from esphome::Controller.
Definition at line 1120 of file web_server.cpp.
|
overridevirtual |
Reimplemented from esphome::Controller.
Definition at line 1685 of file web_server.cpp.
|
overridevirtual |
Reimplemented from esphome::Controller.
Definition at line 682 of file web_server.cpp.
|
overridevirtual |
Reimplemented from esphome::Controller.
Definition at line 762 of file web_server.cpp.
|
overridevirtual |
Reimplemented from esphome::Controller.
Definition at line 1447 of file web_server.cpp.
|
overridevirtual |
Implements esphome::logger::LogListener.
Definition at line 320 of file web_server.cpp.
|
overridevirtual |
Reimplemented from esphome::Controller.
Definition at line 928 of file web_server.cpp.
|
overridevirtual |
Reimplemented from esphome::Controller.
Definition at line 1240 of file web_server.cpp.
|
overridevirtual |
Reimplemented from esphome::Controller.
Definition at line 440 of file web_server.cpp.
|
overridevirtual |
Reimplemented from esphome::Controller.
Definition at line 528 of file web_server.cpp.
|
overridevirtual |
Reimplemented from esphome::Controller.
Definition at line 486 of file web_server.cpp.
|
overridevirtual |
Reimplemented from esphome::Controller.
Definition at line 1184 of file web_server.cpp.
|
overridevirtual |
Reimplemented from esphome::Controller.
Definition at line 1058 of file web_server.cpp.
|
overridevirtual |
Reimplemented from esphome::Controller.
Definition at line 1757 of file web_server.cpp.
|
overridevirtual |
Reimplemented from esphome::Controller.
Definition at line 1521 of file web_server.cpp.
|
inlineprotected |
Definition at line 504 of file web_server.h.
|
inlineprotected |
Definition at line 515 of file web_server.h.
|
inlineprotected |
Definition at line 479 of file web_server.h.
|
inlineprotected |
Definition at line 491 of file web_server.h.
|
inlineprotected |
Definition at line 526 of file web_server.h.
|
static |
Definition at line 1275 of file web_server.cpp.
|
static |
Definition at line 1271 of file web_server.cpp.
|
static |
Definition at line 462 of file web_server.cpp.
|
static |
Definition at line 459 of file web_server.cpp.
| void esphome::web_server::WebServer::set_css_include | ( | const char * | css_include | ) |
Set local path to the script that's embedded in the index page.
Defaults to
| css_include | Local path to web server script. |
Definition at line 271 of file web_server.cpp.
| void esphome::web_server::WebServer::set_css_url | ( | const char * | css_url | ) |
Set the URL to the CSS <link> that's sent to each client.
Defaults to https://oi.esphome.io/v1/webserver-v1.min.css
| css_url | The url to the web server stylesheet. |
|
inline |
Set whether or not the webserver should expose the Log.
| expose_log. |
Definition at line 228 of file web_server.h.
|
inline |
Determine whether internal components should be displayed on the web server.
Defaults to false.
| include_internal | Whether internal components should be displayed. |
Definition at line 223 of file web_server.h.
| void esphome::web_server::WebServer::set_js_include | ( | const char * | js_include | ) |
Set local path to the script that's embedded in the index page.
Defaults to
| js_include | Local path to web server script. |
Definition at line 274 of file web_server.cpp.
| void esphome::web_server::WebServer::set_js_url | ( | const char * | js_url | ) |
Set the URL to the script that's embedded in the index page.
Defaults to https://oi.esphome.io/v1/webserver-v1.min.js
| js_url | The url to the web server script. |
|
overridevirtual |
Setup the internal web server and register handlers.
Reimplemented from esphome::Component.
Definition at line 296 of file web_server.cpp.
|
static |
Definition at line 584 of file web_server.cpp.
|
static |
Definition at line 581 of file web_server.cpp.
|
static |
Definition at line 1218 of file web_server.cpp.
|
static |
Definition at line 509 of file web_server.cpp.
|
static |
Definition at line 505 of file web_server.cpp.
|
static |
Definition at line 1215 of file web_server.cpp.
|
static |
Definition at line 1096 of file web_server.cpp.
|
static |
Definition at line 1093 of file web_server.cpp.
|
static |
Definition at line 1787 of file web_server.cpp.
|
static |
Definition at line 1783 of file web_server.cpp.
|
static |
Definition at line 1582 of file web_server.cpp.
|
static |
Definition at line 1579 of file web_server.cpp.
|
protected |
Definition at line 535 of file web_server.h.
|
protected |
Definition at line 547 of file web_server.h.
|
protected |
Definition at line 543 of file web_server.h.
|
protected |
Definition at line 537 of file web_server.h.
|
protected |
Definition at line 539 of file web_server.h.
|
protected |
Definition at line 552 of file web_server.h.
| bool esphome::web_server::WebServer::include_internal_ {false} |
Definition at line 471 of file web_server.h.
|
protected |
Definition at line 550 of file web_server.h.
|
protected |
Definition at line 544 of file web_server.h.
| std::map<EntityBase *, SortingComponents> esphome::web_server::WebServer::sorting_entitys_ |
Definition at line 467 of file web_server.h.
| std::map<uint64_t, SortingGroup> esphome::web_server::WebServer::sorting_groups_ |
Definition at line 468 of file web_server.h.