mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 19:32:19 +01:00
Always save user wifi credentials if non in config (#4036)
This commit is contained in:
@@ -39,11 +39,8 @@ void WiFiComponent::setup() {
|
||||
this->last_connected_ = millis();
|
||||
this->wifi_pre_setup_();
|
||||
|
||||
#ifndef USE_CAPTIVE_PORTAL_KEEP_USER_CREDENTIALS
|
||||
uint32_t hash = fnv1_hash(App.get_compilation_time());
|
||||
#else
|
||||
uint32_t hash = 88491487UL;
|
||||
#endif
|
||||
uint32_t hash = this->has_sta() ? fnv1_hash(App.get_compilation_time()) : 88491487UL;
|
||||
|
||||
this->pref_ = global_preferences->make_preference<wifi::SavedWifiSettings>(hash, true);
|
||||
|
||||
SavedWifiSettings save{};
|
||||
|
Reference in New Issue
Block a user