diff --git a/esphome/components/template/alarm_control_panel/template_alarm_control_panel.cpp b/esphome/components/template/alarm_control_panel/template_alarm_control_panel.cpp index 5cd8870660..b2cb7dfac2 100644 --- a/esphome/components/template/alarm_control_panel/template_alarm_control_panel.cpp +++ b/esphome/components/template/alarm_control_panel/template_alarm_control_panel.cpp @@ -128,10 +128,10 @@ void TemplateAlarmControlPanel::loop() { // Look for the transition from closed to open if ((!this->sensor_data_[sensor_info.second.store_index].last_chime_state) && (sensor_info.first->state)) { // Must be disarmed to chime - if (this->current_state_ == ACP_STATE_DISARMED) { - this->chime_callback_.call(); + if (this->current_state_ == ACP_STATE_DISARMED) { + this->chime_callback_.call(); + } } - } // Record the sensor state change this->sensor_data_[sensor_info.second.store_index].last_chime_state = sensor_info.first->state; }