diff --git a/esphome/core/helpers.h b/esphome/core/helpers.h index 6cc0e4440e..192fd3838c 100644 --- a/esphome/core/helpers.h +++ b/esphome/core/helpers.h @@ -202,9 +202,9 @@ template class FixedVector { /// Constructor from initializer list - allocates exact size needed /// This enables brace initialization: FixedVector v = {1, 2, 3}; - FixedVector(std::initializer_list init) { - init(init.size()); - for (const auto &item : init) { + FixedVector(std::initializer_list init_list) { + init(init_list.size()); + for (const auto &item : init_list) { push_back(item); } }