Fix max value for autoLockTimeOut (#459)
* Fix max value for autoLockTimeOut * Fix the autoLockTimeOut max value in NukiWrapper.cpp
This commit is contained in:
@@ -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" }` |
|
| 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" }` |
|
| 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" }` |
|
| 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" }` |
|
| 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" }` |
|
| 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" }` |
|
| nightModeStartTime | Start time for nightmode if enabled. | Time in "HH:MM" format |`{ "nightModeStartTime": "22:00" }` |
|
||||||
|
|||||||
@@ -2154,7 +2154,7 @@ void NukiNetwork::publishHASSConfigAdditionalLockEntities(char *deviceType, cons
|
|||||||
{ (char*)"cmd_tpl", (char*)"{ \"autoLockTimeOut\": \"{{ value }}\" }" },
|
{ (char*)"cmd_tpl", (char*)"{ \"autoLockTimeOut\": \"{{ value }}\" }" },
|
||||||
{ (char*)"val_tpl", (char*)"{{value_json.autoLockTimeOut}}" },
|
{ (char*)"val_tpl", (char*)"{{value_json.autoLockTimeOut}}" },
|
||||||
{ (char*)"min", (char*)"30" },
|
{ (char*)"min", (char*)"30" },
|
||||||
{ (char*)"max", (char*)"180" }});
|
{ (char*)"max", (char*)"1800" }});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1621,7 +1621,7 @@ void NukiWrapper::onConfigUpdateReceived(const char *value)
|
|||||||
{
|
{
|
||||||
const uint8_t keyvalue = atoi(jsonchar);
|
const uint8_t keyvalue = atoi(jsonchar);
|
||||||
|
|
||||||
if(keyvalue >= 30 && keyvalue <= 180)
|
if(keyvalue >= 30 && keyvalue <= 1800)
|
||||||
{
|
{
|
||||||
if(_nukiAdvancedConfig.autoLockTimeOut == keyvalue) jsonResult[advancedKeys[j]] = "unchanged";
|
if(_nukiAdvancedConfig.autoLockTimeOut == keyvalue) jsonResult[advancedKeys[j]] = "unchanged";
|
||||||
else cmdResult = _nukiLock.setAutoLockTimeOut(keyvalue);
|
else cmdResult = _nukiLock.setAutoLockTimeOut(keyvalue);
|
||||||
|
|||||||
Reference in New Issue
Block a user