1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-23 20:23:50 +01:00

Add datetime date entities (#6191)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
RFDarter
2024-03-10 19:52:22 +01:00
committed by GitHub
parent 4ec2b37cc6
commit 1e96a19d09
44 changed files with 1553 additions and 22 deletions

View File

@@ -221,6 +221,15 @@ class WebServer : public Controller, public Component, public AsyncWebHandler {
std::string number_json(number::Number *obj, float value, JsonDetail start_config);
#endif
#ifdef USE_DATETIME_DATE
void on_date_update(datetime::DateEntity *obj) override;
/// Handle a date request under '/date/<id>'.
void handle_date_request(AsyncWebServerRequest *request, const UrlMatch &match);
/// Dump the date state with its value as a JSON string.
std::string date_json(datetime::DateEntity *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>'.