X-Git-Url: http://plrg.eecs.uci.edu/git/?p=smartthings-infrastructure.git;a=blobdiff_plain;f=SwitchLevel%2FSwitchLevels.groovy;h=773c1ccfad8e37d48107045e1b7768a2a2e2cc48;hp=bc9140cc4344c844f06a23bdf562ee654790c41f;hb=2932def9bb947d617975235763f7338360f0e5a4;hpb=f719b3a1011f5d99e474a4164b09e3ab528a9dfe diff --git a/SwitchLevel/SwitchLevels.groovy b/SwitchLevel/SwitchLevels.groovy index bc9140c..773c1cc 100644 --- a/SwitchLevel/SwitchLevels.groovy +++ b/SwitchLevel/SwitchLevels.groovy @@ -19,6 +19,7 @@ public class SwitchLevels { private int hue = 30 private int currentHue = 30 private int saturation = 70 + private int currentSaturation = 70 private String switchState = "on" private String currentSwitch = "on" private String switchLatestValue = "on" @@ -37,6 +38,7 @@ public class SwitchLevels { this.hue = 30 this.currentHue = 30 this.saturation = 70 + this.currentSaturation = 70 this.switchState = "off" this.currentSwitch = "off" this.switchLatestValue = "off" @@ -48,6 +50,7 @@ public class SwitchLevels { this.hue = 50 this.currentHue = 50 this.saturation = 90 + this.currentSaturation = 90 this.switchState = "on" this.currentSwitch = "on" this.switchLatestValue = "on" @@ -85,6 +88,7 @@ public class SwitchLevels { this.hue = metaData["hue"] this.currentHue = metaData["hue"] this.saturation = metaData["saturation"] + this.currentSaturation = metaData["saturation"] switchLevels[0].setColor(metaData) } }