Skip to content

Commit

Permalink
Fix max value for autoLockTimeOut (#459)
Browse files Browse the repository at this point in the history
* Fix max value for autoLockTimeOut

* Fix the autoLockTimeOut max value in NukiWrapper.cpp
  • Loading branch information
Mincka authored Aug 20, 2024
1 parent c4ca957 commit 618591e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ Changing settings has to enabled first in the configuration portal. Check the se
| batteryType | The type of the batteries present in the smart lock. | "Alkali", "Accumulators", "Lithium" |`{ "batteryType": "Accumulators" }` |
| automaticBatteryTypeDetection | Whether the automatic detection of the battery type is enabled. | 1 = enabled, 0 = disabled |`{ "automaticBatteryTypeDetection": "Lock n Go" }` |
| unlatchDuration | Duration in seconds for holding the latch in unlatched position. | Integer between 1 and 30 |`{ "unlatchDuration": "3" }` |
| autoLockTimeOut | Seconds until the smart lock relocks itself after it has been unlocked. | Integer between 30 and 180 |`{ "autoLockTimeOut": "60" }` |
| autoLockTimeOut | Seconds until the smart lock relocks itself after it has been unlocked. | Integer between 30 and 1800 |`{ "autoLockTimeOut": "60" }` |
| autoUnLockDisabled | Whether auto unlock should be disabled in general. | 1 = auto unlock disabled, 0 = auto unlock enabled |`{ "autoUnLockDisabled": "1" }` |
| nightModeEnabled | Whether nightmode is enabled. | 1 = enabled, 0 = disabled |`{ "nightModeEnabled": "1" }` |
| nightModeStartTime | Start time for nightmode if enabled. | Time in "HH:MM" format |`{ "nightModeStartTime": "22:00" }` |
Expand Down
2 changes: 1 addition & 1 deletion src/NukiNetwork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2154,7 +2154,7 @@ void NukiNetwork::publishHASSConfigAdditionalLockEntities(char *deviceType, cons
{ (char*)"cmd_tpl", (char*)"{ \"autoLockTimeOut\": \"{{ value }}\" }" },
{ (char*)"val_tpl", (char*)"{{value_json.autoLockTimeOut}}" },
{ (char*)"min", (char*)"30" },
{ (char*)"max", (char*)"180" }});
{ (char*)"max", (char*)"1800" }});
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/NukiWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1621,7 +1621,7 @@ void NukiWrapper::onConfigUpdateReceived(const char *value)
{
const uint8_t keyvalue = atoi(jsonchar);

if(keyvalue >= 30 && keyvalue <= 180)
if(keyvalue >= 30 && keyvalue <= 1800)
{
if(_nukiAdvancedConfig.autoLockTimeOut == keyvalue) jsonResult[advancedKeys[j]] = "unchanged";
else cmdResult = _nukiLock.setAutoLockTimeOut(keyvalue);
Expand Down

0 comments on commit 618591e

Please sign in to comment.