diff --git a/esphome/core/helpers.h b/esphome/core/helpers.h index 5eab5b475d..efba3aa56e 100644 --- a/esphome/core/helpers.h +++ b/esphome/core/helpers.h @@ -1756,7 +1756,7 @@ template struct Callback { cb.fn = [](void *c, Ts... args) { alignas(DecayF) char buf[sizeof(DecayF)]; __builtin_memcpy(buf, &c, sizeof(DecayF)); - reinterpret_cast(buf)->operator()(args...); + (*reinterpret_cast(buf))(args...); }; return cb; } else {