From 3fd130869e81d962c4aebf3b91064d82727bffb5 Mon Sep 17 00:00:00 2001 From: MasterTim17 <52961929+MasterTim17@users.noreply.github.com> Date: Tue, 16 Jun 2020 02:52:47 +0200 Subject: [PATCH] fix for ESP32 'Association Leave' (#1081) --- esphome/components/wifi/wifi_component.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/esphome/components/wifi/wifi_component.cpp b/esphome/components/wifi/wifi_component.cpp index 40f12a8adc..d56e75a070 100644 --- a/esphome/components/wifi/wifi_component.cpp +++ b/esphome/components/wifi/wifi_component.cpp @@ -98,6 +98,7 @@ void WiFiComponent::loop() { case WIFI_COMPONENT_STATE_STA_CONNECTED: { if (!this->is_connected()) { ESP_LOGW(TAG, "WiFi Connection lost... Reconnecting..."); + this->state_ = WIFI_COMPONENT_STATE_STA_CONNECTING; this->retry_connect(); } else { this->status_clear_warning();