mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 19:32:19 +01:00
Configurable Flash Write Interval (#2119)
Co-authored-by: Alex <33379584+alexyao2015@users.noreply.github.com> Co-authored-by: Otto winter <otto@otto-winter.com>
This commit is contained in:
@@ -232,6 +232,8 @@ void WiFiComponent::save_wifi_sta(const std::string &ssid, const std::string &pa
|
||||
strncpy(save.ssid, ssid.c_str(), sizeof(save.ssid));
|
||||
strncpy(save.password, password.c_str(), sizeof(save.password));
|
||||
this->pref_.save(&save);
|
||||
// ensure it's written immediately
|
||||
global_preferences->sync();
|
||||
|
||||
WiFiAP sta{};
|
||||
sta.set_ssid(ssid);
|
||||
|
Reference in New Issue
Block a user