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

Event entity support (#6451)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
David Friedland
2024-04-23 19:35:26 -07:00
committed by GitHub
parent b03d0f37a4
commit c531a528f0
41 changed files with 792 additions and 0 deletions

View File

@@ -297,6 +297,13 @@ class WebServer : public Controller, public Component, public AsyncWebHandler {
alarm_control_panel::AlarmControlPanelState value, JsonDetail start_config);
#endif
#ifdef USE_EVENT
void on_event(event::Event *obj, const std::string &event_type) override;
/// 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
/// Override the web handler's canHandle method.
bool canHandle(AsyncWebServerRequest *request) override;
/// Override the web handler's handleRequest method.