From 1b4858c31e2d38ddfaadb872f0acb11df0887990 Mon Sep 17 00:00:00 2001 From: Rahmadi Trimananda Date: Thu, 8 Aug 2019 15:38:25 -0700 Subject: [PATCH] Update Switches.groovy --- third-party/Switches.groovy | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) 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 - } - } -} -- 2.34.1