From d3196e0e34584bebc63b7a3a23d6403f4ceffdea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20S=C3=A1rk=C3=B6zi?= Date: Mon, 11 Sep 2023 22:12:56 +0200 Subject: [PATCH] Fix disabled wifi crash on boot (#5370) --- esphome/components/wifi/wifi_component.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/esphome/components/wifi/wifi_component.cpp b/esphome/components/wifi/wifi_component.cpp index ff621291f0..2cb36fe8ea 100644 --- a/esphome/components/wifi/wifi_component.cpp +++ b/esphome/components/wifi/wifi_component.cpp @@ -40,6 +40,9 @@ void WiFiComponent::setup() { if (this->enable_on_boot_) { this->start(); } else { +#ifdef USE_ESP32 + esp_netif_init(); +#endif this->state_ = WIFI_COMPONENT_STATE_DISABLED; } }