}
def mainPage() {
+ section("Master Light") {
+ input "master", "capability.colorControl", title: "Colored Light", required: true
+ }
+ section("Lights that follow the master settings") {
+ input "slaves", "capability.colorControl", title: "Colored Lights", multiple: true, required: true, submitOnChange: true
+ }
+ section([mobileOnly:true], "Options") {
+ input "randomYes", "bool",title: "When Master Turned On, Randomize Color", defaultValue: false
+ href "pageAbout", title: "About ${textAppName()}", description: "Tap to get application version, license and instructions"
+ }
+
dynamicPage(name: "mainPage", title: "", install: true, uninstall: false) {
- def masterInList = slaves?.id?.find{it==master?.id}
+ def masterInList = slaves?.id?.find{it==master?.id}
if (masterInList) {
section ("**WARNING**"){
- paragraph "You have included the Master Light in the Slave Group. This will cause a loop in execution. Please remove this device from the Slave Group.", image: "https://raw.githubusercontent.com/MichaelStruck/SmartThingsPublic/master/img/caution.png"
- }
+ paragraph "You have included the Master Light in the Slave Group. This will cause a loop in execution. Please remove this device from the Slave Group.", image: "https://raw.githubusercontent.com/MichaelStruck/SmartThingsPublic/master/img/caution.png"
+ }
}
- section("Master Light") {
- input "master", "capability.colorControl", title: "Colored Light", required: true
- }
- section("Lights that follow the master settings") {
- input "slaves", "capability.colorControl", title: "Colored Lights", multiple: true, required: true, submitOnChange: true
+
+ page(name: "pageAbout", title: "About ${textAppName()}", uninstall: true) {
+ section {
+ paragraph "${textVersion()}\n${textCopyright()}\n\n${textLicense()}\n"
+ }
+ section("Instructions") {
+ paragraph textHelp()
+ }
+ section("Tap button below to remove application"){
+ }
}
- section([mobileOnly:true], "Options") {
- input "randomYes", "bool",title: "When Master Turned On, Randomize Color", defaultValue: false
- href "pageAbout", title: "About ${textAppName()}", description: "Tap to get application version, license and instructions"
- }
- }
-}
-
-page(name: "pageAbout", title: "About ${textAppName()}", uninstall: true) {
- section {
- paragraph "${textVersion()}\n${textCopyright()}\n\n${textLicense()}\n"
- }
- section("Instructions") {
- paragraph textHelp()
+
}
- section("Tap button below to remove application"){
- }
}
def installed() {
}
def init() {
- subscribe(master, "switch", onOffHandler)
- subscribe(master, "level", colorHandler)
+ subscribe(master, "switch", onOffHandler)
+ subscribe(master, "level", colorHandler)
subscribe(master, "hue", colorHandler)
subscribe(master, "saturation", colorHandler)
subscribe(master, "colorTemperature", tempHandler)