mirror of
https://github.com/esphome/esphome.git
synced 2025-11-14 13:55:45 +00:00
much simpler
This commit is contained in:
@@ -1128,6 +1128,17 @@ void WiFiComponent::retry_connect() {
|
||||
|
||||
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
|
||||
if (this->state_ == WIFI_COMPONENT_STATE_STA_CONNECTING) {
|
||||
yield();
|
||||
|
||||
Reference in New Issue
Block a user