mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 13:34:54 +01:00
Fix disabled wifi crash on boot (#5370)
This commit is contained in:
parent
deb34c9473
commit
d3196e0e34
1 changed files with 3 additions and 0 deletions
|
@ -40,6 +40,9 @@ void WiFiComponent::setup() {
|
||||||
if (this->enable_on_boot_) {
|
if (this->enable_on_boot_) {
|
||||||
this->start();
|
this->start();
|
||||||
} else {
|
} else {
|
||||||
|
#ifdef USE_ESP32
|
||||||
|
esp_netif_init();
|
||||||
|
#endif
|
||||||
this->state_ = WIFI_COMPONENT_STATE_DISABLED;
|
this->state_ = WIFI_COMPONENT_STATE_DISABLED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue