From 098ad07f59670d32abbb3328b76474883219db1e Mon Sep 17 00:00:00 2001 From: rtrimana Date: Mon, 5 Aug 2019 12:39:56 -0700 Subject: [PATCH 1/1] Fixing a bug in ColorControl. --- ColorControl/ColorControls.groovy | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ColorControl/ColorControls.groovy b/ColorControl/ColorControls.groovy index 4919ebe..a85298d 100644 --- a/ColorControl/ColorControls.groovy +++ b/ColorControl/ColorControls.groovy @@ -192,17 +192,17 @@ public class ColorControls { } } - def on(String currentSwitch) { - if (currentSwitch != this.currentSwitch) { - this.currentSwitch = currentSwitch - colorControls[0].on(currentSwitch) + def on() { + if (this.currentSwitch != "on") { + this.currentSwitch = "on" + colorControls[0].on() } } - def off(String currentSwitch) { - if (currentSwitch != this.currentSwitch) { - this.currentSwitch = currentSwitch - colorControls[0].off(currentSwitch) + def off() { + if (this.currentSwitch != "off") { + this.currentSwitch = "off" + colorControls[0].off() } } -- 2.34.1