diff --git a/components/ratgdo/observable.h b/components/ratgdo/observable.h index 5947a0d..01e4c74 100644 --- a/components/ratgdo/observable.h +++ b/components/ratgdo/observable.h @@ -2,6 +2,7 @@ #include #include #include +#include "esphome/core/log.h" namespace esphome { namespace ratgdo { @@ -31,10 +32,13 @@ namespace ratgdo { void subscribe(Observer&& observer) { this->observers_.push_back(std::forward(observer)); + ESP_LOGD("XXX","The observers vector is %d in length",this->observers_->size()); } void notify() const { + ESP_LOGD("YYY","NOTIFY %d subscribers",this->observers_->size()); + for (const auto& observer : this->observers_) { observer(this->value_); }