From 4e6bdb31ac0243aa2261a9889c7aa6474f6fec60 Mon Sep 17 00:00:00 2001 From: Oxan van Leeuwen Date: Mon, 24 Jan 2022 20:57:26 +0100 Subject: [PATCH] Make CallbackManager invocable (#3089) --- esphome/core/helpers.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/esphome/core/helpers.h b/esphome/core/helpers.h index c9a27a2fab..95bf10abc3 100644 --- a/esphome/core/helpers.h +++ b/esphome/core/helpers.h @@ -176,6 +176,9 @@ template class CallbackManager { cb(args...); } + /// Call all callbacks in this manager. + void operator()(Ts... args) { call(args...); } + protected: std::vector> callbacks_; };