diff --git a/smartapps/ethayer/lock-manager.src/lock-manager.groovy b/smartapps/ethayer/lock-manager.src/lock-manager.groovy index 041f0d6..0f8adf6 100755 --- a/smartapps/ethayer/lock-manager.src/lock-manager.groovy +++ b/smartapps/ethayer/lock-manager.src/lock-manager.groovy @@ -92,6 +92,13 @@ def lockInfoPage(params) { } } } + + section('Lock Settings') { + def pinLength = lockApp.pinLength() + if (pinLength) { + paragraph "Required Length: ${pinLength}" + } + } } else { section() { paragraph 'Error: Can\'t find lock!' diff --git a/smartapps/ethayer/lock-user.src/lock-user.groovy b/smartapps/ethayer/lock-user.src/lock-user.groovy index 97f2aaa..8de679e 100755 --- a/smartapps/ethayer/lock-user.src/lock-user.groovy +++ b/smartapps/ethayer/lock-user.src/lock-user.groovy @@ -148,11 +148,11 @@ def landingPage() { } def setupPage() { - dynamicPage(name: "setupPage", title: "Setup Lock", nextPage: "mainPage", uninstall: true) { - section("Choose devices for this lock") { - input(name: 'userName', title: "Name for User", required: true, image: 'https://dl.dropboxusercontent.com/u/54190708/LockManager/user.png') - input(name: "userCode", type: "text", title: userCodeInputTitle(), required: false, defaultValue: settings."userCode", refreshAfterSelection: true) - input(name: "userSlot", type: "enum", options: parent.availableSlots(settings.userSlot), title: "Select slot", required: true, refreshAfterSelection: true ) + dynamicPage(name: 'setupPage', title: 'Setup Lock', nextPage: 'mainPage', uninstall: true) { + section('Choose devices for this lock') { + input(name: 'userName', title: 'Name for User', required: true, image: 'https://dl.dropboxusercontent.com/u/54190708/LockManager/user.png') + input(name: 'userCode', type: 'text', title: userCodeInputTitle(), required: false, defaultValue: settings.'userCode', refreshAfterSelection: true) + input(name: 'userSlot', type: 'enum', options: parent.availableSlots(settings.userSlot), title: 'Select slot', required: true, refreshAfterSelection: true ) } } } @@ -169,7 +169,7 @@ def mainPage() { text = 'inactive' } paragraph "${text}/${usage}" - input(name: "userCode", type: "text", title: userCodeInputTitle(), required: false, defaultValue: settings."userCode", refreshAfterSelection: true) + input(name: 'userCode', type: 'text', title: userCodeInputTitle(), required: false, defaultValue: settings.'userCode', refreshAfterSelection: true) } section('Additional Settings') { def actions = location.helloHome?.getPhrases()*.label @@ -201,8 +201,10 @@ def mainPage() { def userCodeInputTitle() { def title = 'Code 4-8 digits' + def pinLength + def lockApps = parent.getLockApps() lockApps.each { lockApp -> - def pinLength = lockApp.pinLength() + pinLength = lockApp.pinLength() if (pinLength) { title = "Code (Must be ${lockApp.lock.latestValue('pinLength')} digits)" }