Skip to content

Commit 5d925ca

Browse files
committed
set pin after init
1 parent 75f0360 commit 5d925ca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

components/nuki_lock/nuki_lock.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,6 @@ void NukiLockComponent::setup() {
964964
} else {
965965
ESP_LOGD(TAG, "Using security pin from configuration file: %i", this->security_pin_);
966966
}
967-
this->use_security_pin();
968967

969968
this->traits.set_supported_states(
970969
std::set<lock::LockState> {
@@ -984,6 +983,8 @@ void NukiLockComponent::setup() {
984983
this->nuki_lock_.initialize();
985984
this->nuki_lock_.setConnectTimeout(BLE_CONNECT_TIMEOUT_SEC);
986985
this->nuki_lock_.setConnectRetries(BLE_CONNECT_TIMEOUT_RETRIES);
986+
987+
this->use_security_pin();
987988

988989
if (this->nuki_lock_.isPairedWithLock()) {
989990
this->status_update_ = true;

0 commit comments

Comments
 (0)