From 2fb86c9352aec263be71c027f89398e293974027 Mon Sep 17 00:00:00 2001 From: Seyed Amir Hossein Aqajari Date: Sat, 10 Aug 2019 15:24:47 -0700 Subject: [PATCH 1/1] Update hue-minimote.groovy --- official/hue-minimote.groovy | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/official/hue-minimote.groovy b/official/hue-minimote.groovy index 5c46779..6d032a6 100644 --- a/official/hue-minimote.groovy +++ b/official/hue-minimote.groovy @@ -90,8 +90,8 @@ def handleButton1Pushed() { hueLamps.setColor(level: 100, hue: 20, saturation: 80) // notice the "?." operator - tvLights may not be set (required: false). - tvLights?.setColor(level: 100, hue: 100, saturation: 100) - otherLights?.on() + tvLights.setColor(level: 100, hue: 100, saturation: 100) + otherLights.on() } // turn everything off @@ -99,8 +99,8 @@ def handleButton1Held() { log.debug "handleButton1Held" hueLamps.off() - tvLights?.off() - otherLights?.off() + tvLights.off() + otherLights.off() } // soft, dim white light @@ -109,7 +109,7 @@ def handleButton2Pushed() { hueLamps.setColor(level: 50, hue: 20, saturation: 80) tvLights.setColor(level: 30, hue: 70, saturation: 70) - otherLights?.on() + otherLights.on() } // set to what you want! @@ -120,8 +120,8 @@ def handleButton2Held() { // dim red light def handleButton3Pushed() { hueLamps.setColor(level: 40, hue: 100, saturation: 100) - tvLights?.setColor(level: 30, hue: 100, saturation: 100) - otherLights?.off() + tvLights.setColor(level: 30, hue: 100, saturation: 100) + otherLights.off() } // set to what you want! @@ -134,8 +134,8 @@ def handleButton4Pushed() { log.debug "handleButton4Pushed" hueLamps.setColor(level: 10, hue: 70, saturation: 100) - tvLights?.setColor(level: 10, hue: 70, saturation: 100) - otherLights?.off() + tvLights.setColor(level: 10, hue: 70, saturation: 100) + otherLights.off() } // debug information -- 2.34.1