projects
/
smartthings-infrastructure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add a method to SwitchLevel class!
[smartthings-infrastructure.git]
/
SwitchLevel
/
SwitchLevels.groovy
diff --git
a/SwitchLevel/SwitchLevels.groovy
b/SwitchLevel/SwitchLevels.groovy
index 5d02053b334ebdea6aaaf85cc78608b8866e0dc8..d9d2e267617a05943ffcc70f5eea37e0501cc240 100644
(file)
--- a/
SwitchLevel/SwitchLevels.groovy
+++ b/
SwitchLevel/SwitchLevels.groovy
@@
-76,6
+76,11
@@
public class SwitchLevels {
switchLevels[0].setColor(metaData)
}
}
+
+ def setLevel(String level) {
+ def newLevel = level.toInteger()
+ setLevel(newLevel)
+ }
def setLevel(int level) {
if (this.level != level) {