diff --git a/esphome/components/binary_sensor/automation.h b/esphome/components/binary_sensor/automation.h index bab6e8577e9..c52a27fa732 100644 --- a/esphome/components/binary_sensor/automation.h +++ b/esphome/components/binary_sensor/automation.h @@ -133,10 +133,9 @@ template class MultiClickTrigger : public MultiClickTriggerBase { : MultiClickTriggerBase(parent) { size_t i = 0; for (const auto &t : timing) { - if (i >= N) - break; this->timing_storage_[i++] = t; } + ESPHOME_DEBUG_ASSERT(i == N); this->timing_ = this->timing_storage_.data(); this->timing_count_ = N; }