1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-24 04:33:49 +01:00

[core] Update Entities (#6885)

This commit is contained in:
Jesse Hills
2024-06-12 09:57:36 +12:00
committed by GitHub
parent 7dc07c5632
commit 3cd2fb0843
49 changed files with 1191 additions and 2 deletions

View File

@@ -7,8 +7,8 @@
#include "esphome/core/controller.h"
#include "esphome/core/entity_base.h"
#include <vector>
#include <map>
#include <vector>
#ifdef USE_ESP32
#include <freertos/FreeRTOS.h>
#include <freertos/semphr.h>
@@ -319,6 +319,16 @@ class WebServer : public Controller, public Component, public AsyncWebHandler {
std::string event_json(event::Event *obj, const std::string &event_type, JsonDetail start_config);
#endif
#ifdef USE_UPDATE
void on_update(update::UpdateEntity *obj) override;
/// Handle a update request under '/update/<id>'.
void handle_update_request(AsyncWebServerRequest *request, const UrlMatch &match);
/// Dump the update state with its value as a JSON string.
std::string update_json(update::UpdateEntity *obj, JsonDetail start_config);
#endif
/// Override the web handler's canHandle method.
bool canHandle(AsyncWebServerRequest *request) override;
/// Override the web handler's handleRequest method.