mirror of
https://github.com/esphome/esphome.git
synced 2025-09-26 23:22:21 +01:00
Add datetime entities (#6513)
This commit is contained in:
@@ -273,6 +273,15 @@ void APIServer::on_time_update(datetime::TimeEntity *obj) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef USE_DATETIME_DATETIME
|
||||
void APIServer::on_datetime_update(datetime::DateTimeEntity *obj) {
|
||||
if (obj->is_internal())
|
||||
return;
|
||||
for (auto &c : this->clients_)
|
||||
c->send_datetime_state(obj);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef USE_TEXT
|
||||
void APIServer::on_text_update(text::Text *obj, const std::string &state) {
|
||||
if (obj->is_internal())
|
||||
|
Reference in New Issue
Block a user