1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 11:22:24 +01:00

wifi: retry connection if the connection is not valid (#994)

This commit is contained in:
Abílio Costa
2020-03-30 18:32:48 +01:00
committed by GitHub
parent 4ec636c08f
commit 25cdbacecc

View File

@@ -420,6 +420,12 @@ void WiFiComponent::check_connecting_finished() {
wl_status_t status = this->wifi_sta_status_();
if (status == WL_CONNECTED) {
if (WiFi.SSID().equals("")) {
ESP_LOGW(TAG, "Incomplete connection.");
this->retry_connect();
return;
}
ESP_LOGI(TAG, "WiFi Connected!");
this->print_connect_params_();