1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-14 22:05:54 +00:00

much simpler

This commit is contained in:
J. Nick Koston
2025-11-09 16:32:05 -06:00
parent e84d459f46
commit 2480663b87

View File

@@ -1128,6 +1128,17 @@ void WiFiComponent::retry_connect() {
this->error_from_callback_ = false; this->error_from_callback_ = false;
// Check if we need scan results but don't have valid ones
if (this->needs_scan_results_()) {
ESP_LOGD(TAG, "No valid scan results, skipping connection attempt");
// Skip to phase transition logic (will trigger scan or move to next phase)
WiFiRetryPhase next_phase = this->determine_next_phase_();
if (next_phase != this->retry_phase_) {
this->transition_to_phase_(this->retry_phase_, next_phase);
}
return;
}
// Execute phase-specific connection logic // Execute phase-specific connection logic
if (this->state_ == WIFI_COMPONENT_STATE_STA_CONNECTING) { if (this->state_ == WIFI_COMPONENT_STATE_STA_CONNECTING) {
yield(); yield();