From c552c5bf9ceb9f79fef318c1e0dd714131e2bac6 Mon Sep 17 00:00:00 2001 From: Paul Wieland Date: Thu, 1 Aug 2024 08:49:54 -0400 Subject: [PATCH] testing multiple subscriptions --- components/ratgdo/number/ratgdo_number.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/ratgdo/number/ratgdo_number.cpp b/components/ratgdo/number/ratgdo_number.cpp index 68df7b5..b326c6f 100644 --- a/components/ratgdo/number/ratgdo_number.cpp +++ b/components/ratgdo/number/ratgdo_number.cpp @@ -56,8 +56,15 @@ namespace ratgdo { if (this->number_type_ == RATGDO_ROLLING_CODE_COUNTER) { this->parent_->subscribe_rolling_code_counter([=](uint32_t value) { + ESP_LOGD("XXX","The first rolling code counter subscription"); this->update_state(value); }); + + // A second subscription, which seem to overwrite the first subscription + this->parent_->subscribe_rolling_code_counter([=](uint32_t value) { + ESP_LOGD("XXX","A second rolling code counter subscription"); + }); + } else if (this->number_type_ == RATGDO_OPENING_DURATION) { this->parent_->subscribe_opening_duration([=](float value) { this->update_state(value);