1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-24 12:43:51 +01:00

[web_server] expose event compoent to REST (#7587)

This commit is contained in:
RFDarter
2024-10-13 20:50:22 +02:00
committed by GitHub
parent cf14c02b8a
commit 654cee6f83
2 changed files with 25 additions and 0 deletions

View File

@@ -322,6 +322,9 @@ class WebServer : public Controller, public Component, public AsyncWebHandler {
#ifdef USE_EVENT
void on_event(event::Event *obj, const std::string &event_type) override;
/// Handle a event request under '/event<id>'.
void handle_event_request(AsyncWebServerRequest *request, const UrlMatch &match);
/// Dump the event details with its value as a JSON string.
std::string event_json(event::Event *obj, const std::string &event_type, JsonDetail start_config);
#endif