mirror of
https://github.com/esphome/esphome.git
synced 2025-11-18 15:55:46 +00:00
no delay
This commit is contained in:
@@ -676,10 +676,10 @@ void WiFiComponent::save_wifi_sta(const std::string &ssid, const std::string &pa
|
|||||||
this->force_scan_after_provision_ = true;
|
this->force_scan_after_provision_ = true;
|
||||||
|
|
||||||
// Trigger connection attempt (exits cooldown if needed, no-op if already connecting/connected)
|
// Trigger connection attempt (exits cooldown if needed, no-op if already connecting/connected)
|
||||||
this->connect_soon();
|
this->connect_soon_();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WiFiComponent::connect_soon() {
|
void WiFiComponent::connect_soon_() {
|
||||||
// Only trigger retry if we're in cooldown - if already connecting/connected, do nothing
|
// Only trigger retry if we're in cooldown - if already connecting/connected, do nothing
|
||||||
if (this->state_ == WIFI_COMPONENT_STATE_COOLDOWN) {
|
if (this->state_ == WIFI_COMPONENT_STATE_COOLDOWN) {
|
||||||
ESP_LOGD(TAG, "Exiting cooldown early due to new WiFi credentials");
|
ESP_LOGD(TAG, "Exiting cooldown early due to new WiFi credentials");
|
||||||
|
|||||||
@@ -425,6 +425,8 @@ class WiFiComponent : public Component {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void connect_soon_();
|
||||||
|
|
||||||
void wifi_loop_();
|
void wifi_loop_();
|
||||||
bool wifi_mode_(optional<bool> sta, optional<bool> ap);
|
bool wifi_mode_(optional<bool> sta, optional<bool> ap);
|
||||||
bool wifi_sta_pre_setup_();
|
bool wifi_sta_pre_setup_();
|
||||||
|
|||||||
Reference in New Issue
Block a user