mirror of
https://github.com/esphome/esphome.git
synced 2025-09-03 03:42:20 +01:00
Allow preserving WiFi credentials entered with captive_portal (#3813)
This commit is contained in:
committed by
GitHub
parent
3b21d1d81e
commit
4bf94e0757
@@ -38,7 +38,11 @@ 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
|
||||
this->pref_ = global_preferences->make_preference<wifi::SavedWifiSettings>(hash, true);
|
||||
|
||||
SavedWifiSettings save{};
|
||||
|
Reference in New Issue
Block a user