mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 17:05:36 +00:00
Fix Wifi not connecting with Ethernet config but disconnected.
This commit is contained in:
@@ -155,10 +155,11 @@ void WiFiComponent::wifi_pre_setup_() {
|
||||
return;
|
||||
}
|
||||
err = esp_event_loop_create_default();
|
||||
if (err != ERR_OK) {
|
||||
if (err != ESP_OK && err != ESP_ERR_INVALID_STATE) {
|
||||
ESP_LOGE(TAG, "esp_event_loop_create_default failed: %s", esp_err_to_name(err));
|
||||
this->mark_failed();
|
||||
return;
|
||||
}
|
||||
}
|
||||
esp_event_handler_instance_t instance_wifi_id, instance_ip_id;
|
||||
err = esp_event_handler_instance_register(WIFI_EVENT, ESP_EVENT_ANY_ID, &event_handler, nullptr, &instance_wifi_id);
|
||||
if (err != ERR_OK) {
|
||||
|
||||
Reference in New Issue
Block a user