mirror of
https://github.com/esphome/esphome.git
synced 2026-03-03 11:18:21 -07:00
[core] Implement Global Controller Registry to reduce RAM usage (#11772)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "update_entity.h"
|
||||
|
||||
#include "esphome/core/defines.h"
|
||||
#include "esphome/core/controller_registry.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
@@ -32,6 +33,9 @@ void UpdateEntity::publish_state() {
|
||||
|
||||
this->set_has_state(true);
|
||||
this->state_callback_.call();
|
||||
#if defined(USE_UPDATE) && defined(USE_CONTROLLER_REGISTRY)
|
||||
ControllerRegistry::notify_update(this);
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace update
|
||||
|
||||
Reference in New Issue
Block a user