1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-16 23:05:46 +00:00
This commit is contained in:
J. Nick Koston
2025-11-06 11:37:08 -06:00
parent 7d4b3ff3a6
commit bfca9cb6c2

View File

@@ -386,10 +386,8 @@ WiFiAP WiFiComponent::build_selected_ap_() const {
}
WiFiAP WiFiComponent::get_sta() {
if (const WiFiAP *config = this->get_selected_sta_()) {
return *config;
}
return WiFiAP{};
const WiFiAP *config = this->get_selected_sta_();
return config ? *config : WiFiAP{};
}
void WiFiComponent::save_wifi_sta(const std::string &ssid, const std::string &password) {
SavedWifiSettings save{}; // zero-initialized - all bytes set to \0, guaranteeing null termination