1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 14:43:51 +00:00

fix: increment index in remove_lamp method to prevent infinite loop

This commit is contained in:
Oliver Kleinecke
2025-02-17 16:10:33 +01:00
parent 685597c2f2
commit 745393401c

View File

@@ -169,6 +169,7 @@ void DynamicLampComponent::remove_lamp(std::string lamp_name) {
ESP_LOGV(TAG, "Removed lamp %s, total lamps now %" PRIu8 "", this->active_lamps_[i].name.c_str(), this->lamp_count_);
return;
}
i++;
}
this->status_set_warning();
ESP_LOGW(TAG, "No lamp with name %s defined !", lamp_name.c_str());