From: Rahmadi Trimananda Date: Thu, 8 Aug 2019 22:38:25 +0000 (-0700) Subject: Update Switches.groovy X-Git-Url: http://plrg.eecs.uci.edu/git/?p=smartapps.git;a=commitdiff_plain;h=1b4858c31e2d38ddfaadb872f0acb11df0887990 Update Switches.groovy --- diff --git a/third-party/Switches.groovy b/third-party/Switches.groovy index 3f8ea92..3a22868 100755 --- a/third-party/Switches.groovy +++ b/third-party/Switches.groovy @@ -21,6 +21,17 @@ definition( iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience@2x.png", iconX3Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience@2x.png") +preferences { + page(name: selectSwitches) +} + +def selectSwitches() { + dynamicPage(name: "selectSwitches", title: "Switches", install: true) { + section("Select switches named after Hello Home phrases") { + input "switches", "capability.switch", title: "Switches", multiple: true + } + } +} def installed() { initialize() @@ -46,15 +57,3 @@ def switchHandler(evt) { setLocationMode(mode) } } - -preferences { - page(name: selectSwitches) -} - -def selectSwitches() { - dynamicPage(name: "selectSwitches", title: "Switches", install: true) { - section("Select switches named after Hello Home phrases") { - input "switches", "capability.switch", title: "Switches", multiple: true - } - } -}