diff --git a/smartapps/netatmo/netatmoConnectTherm.groovy b/smartapps/netatmo/netatmoConnectTherm.groovy index 14ccd53..258fd79 100644 --- a/smartapps/netatmo/netatmoConnectTherm.groovy +++ b/smartapps/netatmo/netatmoConnectTherm.groovy @@ -41,14 +41,12 @@ mappings { def authPage() { log.debug "In authPage" - if(canInstallLabs()) { - def description = null + def description = null + if (state.vendorAccessToken == null) { + log.debug "About to create access token." - if (state.vendorAccessToken == null) { - log.debug "About to create access token." - - createAccessToken() - description = "Tap to enter Credentials." + createAccessToken() + description = "Tap to enter Credentials." return dynamicPage(name: "Credentials", title: "Authorize Connection", nextPage:"listDevices", uninstall: true, install:false) { section { href url:buildRedirectUrl("auth"), style:"embedded", required:false, title:"Connect to ${getVendorName()}:", description:description } @@ -60,21 +58,7 @@ def authPage() { section { href url: buildRedirectUrl("receivedToken"), style:"embedded", required:false, title:"${getVendorName()} is now connected to SmartThings!", description:description } } } - } - else - { - def upgradeNeeded = """To use SmartThings Labs, your Hub should be completely up to date. - -To update your Hub, access Location Settings in the Main Menu (tap the gear next to your location name), select your Hub, and choose "Update Hub".""" - - - return dynamicPage(name:"Credentials", title:"Upgrade needed!", nextPage:"", install:false, uninstall: true) { - section { - paragraph "$upgradeNeeded" - } - } - - } + } def auth() { @@ -233,7 +217,7 @@ def receivedToken() {
-