[core] Update Entities (#6885)

This commit is contained in:
Jesse Hills
2024-06-12 09:57:36 +12:00
committed by GitHub
parent 7dc07c5632
commit 3cd2fb0843
49 changed files with 1191 additions and 2 deletions
@@ -177,5 +177,14 @@ bool ListEntitiesIterator::on_event(event::Event *event) {
}
#endif
#ifdef USE_UPDATE
bool ListEntitiesIterator::on_update(update::UpdateEntity *update) {
if (this->web_server_->events_.count() == 0)
return true;
this->web_server_->events_.send(this->web_server_->update_json(update, DETAIL_ALL).c_str(), "state");
return true;
}
#endif
} // namespace web_server
} // namespace esphome