@@ -1204,7 +1204,7 @@ void NukiLockComponent::lock_n_go() {
1204
1204
this ->unlock ();
1205
1205
}
1206
1206
1207
- bool NukiLockComponent::valid_keypad_id (int id) {
1207
+ bool NukiLockComponent::valid_keypad_id (int32_t id) {
1208
1208
bool is_valid = std::find (keypad_code_ids_.begin (), keypad_code_ids_.end (), id) != keypad_code_ids_.end ();
1209
1209
if (!is_valid) {
1210
1210
ESP_LOGE (TAG, " keypad id %d unknown." , id);
@@ -1220,15 +1220,15 @@ bool NukiLockComponent::valid_keypad_name(std::string name) {
1220
1220
return name_valid;
1221
1221
}
1222
1222
1223
- bool NukiLockComponent::valid_keypad_code (int code) {
1223
+ bool NukiLockComponent::valid_keypad_code (int32_t code) {
1224
1224
bool code_valid = (code > 100000 && code < 1000000 && (std::to_string (code).find (' 0' ) == std::string::npos));
1225
1225
if (!code_valid) {
1226
1226
ESP_LOGE (TAG, " keypad code %d is invalid. Code must be 6 digits, without 0." , code);
1227
1227
}
1228
1228
return code_valid;
1229
1229
}
1230
1230
1231
- void NukiLockComponent::add_keypad_entry (std::string name, int code) {
1231
+ void NukiLockComponent::add_keypad_entry (std::string name, int32_t code) {
1232
1232
if (!keypad_paired_) {
1233
1233
ESP_LOGE (TAG, " keypad is not paired to Nuki" );
1234
1234
return ;
@@ -1252,7 +1252,7 @@ void NukiLockComponent::add_keypad_entry(std::string name, int code) {
1252
1252
}
1253
1253
}
1254
1254
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) {
1256
1256
if (!keypad_paired_) {
1257
1257
ESP_LOGE (TAG, " keypad is not paired to Nuki" );
1258
1258
return ;
@@ -1278,7 +1278,7 @@ void NukiLockComponent::update_keypad_entry(int id, std::string name, int code,
1278
1278
}
1279
1279
}
1280
1280
1281
- void NukiLockComponent::delete_keypad_entry (int id) {
1281
+ void NukiLockComponent::delete_keypad_entry (int32_t id) {
1282
1282
if (!keypad_paired_) {
1283
1283
ESP_LOGE (TAG, " keypad is not paired to Nuki" );
1284
1284
return ;
0 commit comments