diff --git a/esphome/core/automation.h b/esphome/core/automation.h index 83f0941bac..5787373cbc 100644 --- a/esphome/core/automation.h +++ b/esphome/core/automation.h @@ -40,7 +40,7 @@ template class TemplatableValue { // For stateful lambdas (not convertible to function pointer): use std::function template - TemplatableValue(F f) requires std::invocable && !std::convertible_to : type_(LAMBDA) { + TemplatableValue(F f) requires std::invocable &&(!std::convertible_to) : type_(LAMBDA) { this->f_ = new std::function(std::move(f)); }