Fix disabled wifi crash on boot (#5370)

This commit is contained in:
Péter Sárközi 2023-09-11 22:12:56 +02:00 committed by GitHub
parent deb34c9473
commit d3196e0e34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}
}