[core] Update Entities (#6885)

This commit is contained in:
Jesse Hills authored and GitHub committed 2024-06-12 09:57:36 +12:00
1 parent 7dc07c5632
commit 3cd2fb0843
49 files changed
+1191 -2

No files matched your search

+6
View File
@@ -121,6 +121,12 @@ void Controller::setup_controller(bool include_internal) {
obj->add_on_event_callback([this, obj](const std::string &event_type) { this->on_event(obj, event_type); });
}
#endif
#ifdef USE_UPDATE
for (auto *obj : App.get_updates()) {
if (include_internal || !obj->is_internal())
obj->add_on_state_callback([this, obj]() { this->on_update(obj); });
}
#endif
}
} // namespace esphome