X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=third-party%2FSwitches.groovy;h=3a2286815b7edc078cefce38082a4c13547fd187;hb=1b4858c31e2d38ddfaadb872f0acb11df0887990;hp=3f8ea924b26b2991cb47bb07bae475f96983ec23;hpb=14b6cb3f42fa5d5e5944a14e6e71c0ed891d1ea5;p=smartapps.git 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 - } - } -}