1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-19 00:05:43 +00:00

fix false positive logging

This commit is contained in:
J. Nick Koston
2025-11-06 15:07:47 -06:00
parent e4a56c6bc9
commit 1fb233e22f

View File

@@ -922,12 +922,10 @@ void WiFiComponent::save_fast_connect_settings_() {
// Skip save if settings haven't changed (compare with previously saved settings to reduce flash wear)
SavedWifiFastConnectSettings previous_save{};
if (this->fast_connect_pref_.load(&previous_save)) {
if (memcmp(previous_save.bssid, bssid.data(), 6) == 0 && previous_save.channel == channel &&
previous_save.ap_index == ap_index) {
if (this->fast_connect_pref_.load(&previous_save) && memcmp(previous_save.bssid, bssid.data(), 6) == 0 &&
previous_save.channel == channel && previous_save.ap_index == ap_index) {
return; // No change, nothing to save
}
}
SavedWifiFastConnectSettings fast_connect_save{};
memcpy(fast_connect_save.bssid, bssid.data(), 6);