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

Add datetime entities (#6513)

This commit is contained in:
Jesse Hills
2024-04-26 09:19:54 +12:00
committed by GitHub
parent bcef64a6fa
commit 8ef7b41c91
51 changed files with 1430 additions and 55 deletions

View File

@@ -239,6 +239,15 @@ class WebServer : public Controller, public Component, public AsyncWebHandler {
std::string time_json(datetime::TimeEntity *obj, JsonDetail start_config);
#endif
#ifdef USE_DATETIME_DATETIME
void on_datetime_update(datetime::DateTimeEntity *obj) override;
/// Handle a datetime request under '/datetime/<id>'.
void handle_datetime_request(AsyncWebServerRequest *request, const UrlMatch &match);
/// Dump the datetime state with its value as a JSON string.
std::string datetime_json(datetime::DateTimeEntity *obj, JsonDetail start_config);
#endif
#ifdef USE_TEXT
void on_text_update(text::Text *obj, const std::string &state) override;
/// Handle a text input request under '/text/<id>'.