Skip to content

Commit d8b3212

Browse files
committed
Fix linker error
1 parent 83a69b9 commit d8b3212

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

.github/workflows/build.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v4
14+
uses: actions/checkout@v4.2.2
1515

1616
- name: Compile Firmware
17-
uses: esphome/build-action@v5.0.0
17+
uses: esphome/build-action@v6.0.0
1818
with:
1919
yaml-file: .github/test-config.yaml

components/nuki_lock/nuki_lock.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,7 @@ void NukiLockComponent::lock_n_go() {
12041204
this->unlock();
12051205
}
12061206

1207-
bool NukiLockComponent::valid_keypad_id(int id) {
1207+
bool NukiLockComponent::valid_keypad_id(int32_t id) {
12081208
bool is_valid = std::find(keypad_code_ids_.begin(), keypad_code_ids_.end(), id) != keypad_code_ids_.end();
12091209
if (!is_valid) {
12101210
ESP_LOGE(TAG, "keypad id %d unknown.", id);
@@ -1220,15 +1220,15 @@ bool NukiLockComponent::valid_keypad_name(std::string name) {
12201220
return name_valid;
12211221
}
12221222

1223-
bool NukiLockComponent::valid_keypad_code(int code) {
1223+
bool NukiLockComponent::valid_keypad_code(int32_t code) {
12241224
bool code_valid = (code > 100000 && code < 1000000 && (std::to_string(code).find('0') == std::string::npos));
12251225
if (!code_valid) {
12261226
ESP_LOGE(TAG, "keypad code %d is invalid. Code must be 6 digits, without 0.", code);
12271227
}
12281228
return code_valid;
12291229
}
12301230

1231-
void NukiLockComponent::add_keypad_entry(std::string name, int code) {
1231+
void NukiLockComponent::add_keypad_entry(std::string name, int32_t code) {
12321232
if (!keypad_paired_) {
12331233
ESP_LOGE(TAG, "keypad is not paired to Nuki");
12341234
return;
@@ -1252,7 +1252,7 @@ void NukiLockComponent::add_keypad_entry(std::string name, int code) {
12521252
}
12531253
}
12541254

1255-
void NukiLockComponent::update_keypad_entry(int id, std::string name, int code, bool enabled) {
1255+
void NukiLockComponent::update_keypad_entry(int32_t id, std::string name, int32_t code, bool enabled) {
12561256
if (!keypad_paired_) {
12571257
ESP_LOGE(TAG, "keypad is not paired to Nuki");
12581258
return;
@@ -1278,7 +1278,7 @@ void NukiLockComponent::update_keypad_entry(int id, std::string name, int code,
12781278
}
12791279
}
12801280

1281-
void NukiLockComponent::delete_keypad_entry(int id) {
1281+
void NukiLockComponent::delete_keypad_entry(int32_t id) {
12821282
if (!keypad_paired_) {
12831283
ESP_LOGE(TAG, "keypad is not paired to Nuki");
12841284
return;

components/nuki_lock/nuki_lock.h

+5-6
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ struct NukiLockSettings
4545
};
4646

4747
class NukiLockComponent : public lock::Lock, public PollingComponent, public Nuki::SmartlockEventHandler {
48-
4948
#ifdef USE_BINARY_SENSOR
5049
SUB_BINARY_SENSOR(is_connected)
5150
SUB_BINARY_SENSOR(is_paired)
@@ -232,12 +231,12 @@ class NukiLockComponent : public lock::Lock, public PollingComponent, public Nuk
232231

233232
void lock_n_go();
234233
void print_keypad_entries();
235-
void add_keypad_entry(std::string name, int code);
236-
void update_keypad_entry(int id, std::string name, int code, bool enabled);
237-
void delete_keypad_entry(int id);
238-
bool valid_keypad_id(int id);
234+
void add_keypad_entry(std::string name, int32_t code);
235+
void update_keypad_entry(int32_t id, std::string name, int32_t code, bool enabled);
236+
void delete_keypad_entry(int32_t id);
237+
bool valid_keypad_id(int32_t id);
239238
bool valid_keypad_name(std::string name);
240-
bool valid_keypad_code(int code);
239+
bool valid_keypad_code(int32_t code);
241240

242241
std::vector<uint16_t> keypad_code_ids_;
243242
bool keypad_paired_;

0 commit comments

Comments
 (0)