From e9f43d81a3141bcf21847d22af793f62c04ec15c Mon Sep 17 00:00:00 2001 From: Paul Wieland
Date: Thu, 1 Aug 2024 12:22:50 -0400
Subject: [PATCH] update
---
components/ratgdo/number/ratgdo_number.cpp | 9 ++++++++-
components/ratgdo/ratgdo.cpp | 4 ++--
components/ratgdo/ratgdo.h | 2 +-
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/components/ratgdo/number/ratgdo_number.cpp b/components/ratgdo/number/ratgdo_number.cpp
index b326c6f..321dc6a 100644
--- a/components/ratgdo/number/ratgdo_number.cpp
+++ b/components/ratgdo/number/ratgdo_number.cpp
@@ -60,15 +60,22 @@ namespace ratgdo {
this->update_state(value);
});
+ std::string mname = "rolling_code_counter2";
// A second subscription, which seem to overwrite the first subscription
- this->parent_->subscribe_rolling_code_counter([=](uint32_t value) {
+ this->parent_->subscribe_rolling_code_counter([=](uint32_t value, std::string mname) {
ESP_LOGD("XXX","A second rolling code counter subscription");
});
} else if (this->number_type_ == RATGDO_OPENING_DURATION) {
this->parent_->subscribe_opening_duration([=](float value) {
+ ESP_LOGD("ZZZ","The first opening duration subscription");
this->update_state(value);
});
+
+ this->parent_->subscribe_opening_duration([=](float value) {
+ ESP_LOGD("ZZZ","The second opening duration subscription");
+ });
+
} else if (this->number_type_ == RATGDO_CLOSING_DURATION) {
this->parent_->subscribe_closing_duration([=](float value) {
this->update_state(value);
diff --git a/components/ratgdo/ratgdo.cpp b/components/ratgdo/ratgdo.cpp
index 90cb713..5992327 100644
--- a/components/ratgdo/ratgdo.cpp
+++ b/components/ratgdo/ratgdo.cpp
@@ -597,13 +597,13 @@ namespace ratgdo {
this->protocol_->call(InactivateLearn {});
}
- void RATGDOComponent::subscribe_rolling_code_counter(std::function