[core] Implement Global Controller Registry to reduce RAM usage (#11772)

This commit is contained in:
J. Nick Koston authored and GitHub committed 2025-11-09 17:34:08 -06:00
1 parent 1dabe83d04
commit 7abb6d4998
33 files changed
+583 -198

No files matched your search

+5 -1
View File
@@ -1,5 +1,6 @@
#include "date_entity.h"
#include "esphome/core/defines.h"
#include "esphome/core/controller_registry.h"
#ifdef USE_DATETIME_DATE
#include "esphome/core/log.h"
@@ -32,6 +33,9 @@ void DateEntity::publish_state() {
this->set_has_state(true);
ESP_LOGD(TAG, "'%s': Sending date %d-%d-%d", this->get_name().c_str(), this->year_, this->month_, this->day_);
this->state_callback_.call();
#if defined(USE_DATETIME_DATE) && defined(USE_CONTROLLER_REGISTRY)
ControllerRegistry::notify_date_update(this);
#endif
}
DateCall DateEntity::make_call() { return DateCall(this); }