Update hue-minimote.groovy
authorSeyed Amir Hossein Aqajari <amiraj.95@uci.edu>
Sat, 10 Aug 2019 22:24:47 +0000 (15:24 -0700)
committerGitHub Enterprise <noreply@github.uci.edu>
Sat, 10 Aug 2019 22:24:47 +0000 (15:24 -0700)
official/hue-minimote.groovy

index 5c46779ab8c7f711218aa11b3a505f1b16577380..6d032a6aa666976e00b6a2a495c6b05a2a682983 100644 (file)
@@ -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