From d2381556401723e0cd87b6292dde34a0a4f46f29 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 20 Jul 2023 12:37:42 +1200 Subject: [PATCH] Add size getter to CallbackManager (#5129) --- esphome/core/helpers.h | 1 + 1 file changed, 1 insertion(+) diff --git a/esphome/core/helpers.h b/esphome/core/helpers.h index 05a7eaa4cc..63b6949fe9 100644 --- a/esphome/core/helpers.h +++ b/esphome/core/helpers.h @@ -475,6 +475,7 @@ template class CallbackManager { for (auto &cb : this->callbacks_) cb(args...); } + size_t size() const { return this->callbacks_.size(); } /// Call all callbacks in this manager. void operator()(Ts... args) { call(args...); }