Skip to content

Commit be53778

Browse files
committed
Add failed save warning
1 parent 37dca9d commit be53778

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

components/nuki_lock/nuki_lock.cpp

+7-3
Original file line numberDiff line numberDiff line change
@@ -697,9 +697,6 @@ void NukiLockComponent::update_auth_data() {
697697
ESP_LOGD(TAG, "Authorization entry[%d] type: %d name: %s", entry.authId, entry.idType, entry.name);
698698
this->auth_entries_[entry.authId] = std::string(reinterpret_cast<const char*>(entry.name));
699699
}
700-
701-
// Request Event logs when Auth Data is available
702-
this->event_log_update_ = true;
703700
} else {
704701
ESP_LOGW(TAG, "No auth entries! Did you set the security pin?");
705702
}
@@ -994,6 +991,7 @@ void NukiLockComponent::setup() {
994991
this->advanced_config_update_ = true;
995992
if (this->send_events_) {
996993
this->auth_data_update_ = true;
994+
this->event_log_update_ = true;
997995
}
998996

999997
ESP_LOGI(TAG, "%s Nuki paired", this->deviceName_.c_str());
@@ -1492,6 +1490,8 @@ void NukiLockComponent::set_config_select(const char* config, const char* value)
14921490

14931491
this->config_update_ = !is_advanced;
14941492
this->advanced_config_update_ = is_advanced;
1493+
} else {
1494+
ESP_LOGW(TAG, "Saving setting failed: %s", config);
14951495
}
14961496
}
14971497
#endif
@@ -1571,6 +1571,8 @@ void NukiLockComponent::set_config_switch(const char* config, bool value) {
15711571

15721572
this->config_update_ = !is_advanced;
15731573
this->advanced_config_update_ = is_advanced;
1574+
} else {
1575+
ESP_LOGW(TAG, "Saving setting failed: %s", config);
15741576
}
15751577
}
15761578
#endif
@@ -1598,6 +1600,8 @@ void NukiLockComponent::set_config_number(const char* config, float value) {
15981600

15991601
this->config_update_ = !is_advanced;
16001602
this->advanced_config_update_ = is_advanced;
1603+
} else {
1604+
ESP_LOGW(TAG, "Saving setting failed: %s", config);
16011605
}
16021606
}
16031607
#endif

0 commit comments

Comments
 (0)