projects
/
smartthings-infrastructure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removing getXXX methods + properties. Adding getProperty feature to SmartThing(s)
[smartthings-infrastructure.git]
/
SpeechSynthesis
/
SpeechSynthesises.groovy
diff --git
a/SpeechSynthesis/SpeechSynthesises.groovy
b/SpeechSynthesis/SpeechSynthesises.groovy
index 70237ed371ec360be3d0c6c0f90dcb0a1b277de4..2497ce6d73abb9b88117e21f8b54d56f65f220a7 100644
(file)
--- a/
SpeechSynthesis/SpeechSynthesises.groovy
+++ b/
SpeechSynthesis/SpeechSynthesises.groovy
@@
-2,9
+2,6
@@
package SpeechSynthesis
import SmartThing.SmartThings
package SpeechSynthesis
import SmartThing.SmartThings
-//Importing mutable integer class
-import MutableInteger.MutableInteger
-
public class SpeechSynthesises extends SmartThings {
List speechSynthesises = new ArrayList()
public class SpeechSynthesises extends SmartThings {
List speechSynthesises = new ArrayList()
@@
-13,15
+10,15
@@
public class SpeechSynthesises extends SmartThings {
speechSynthesises = smartThings
// Initialization
speechSynthesises = smartThings
// Initialization
- String
Builder id = new StringBuilder("speechSynthesisID0")
- String
Builder label = new StringBuilder("speechSynthesis")
- String
Builder displayName = new StringBuilder("speechSynthesis0")
- MutableInteger level = new MutableInteger()
+ String
id = "speechSynthesisID0"
+ String
label = "level"
+ String
displayName = "speechSynthesiser"
+ Integer level
if (init)
if (init)
- level
.setValue(50)
+ level
= 50
else
else
- level
.setValue(60)
+ level
= 60
speechSynthesises.add(new SpeechSynthesis(sendEvent, id, label, displayName, level))
}
speechSynthesises.add(new SpeechSynthesis(sendEvent, id, label, displayName, level))
}
@@
-34,12
+31,4
@@
public class SpeechSynthesises extends SmartThings {
def speak(String message) {
speechSynthesises[0].speak(message)
}
def speak(String message) {
speechSynthesises[0].speak(message)
}
-
- // Methods to return values
- def getCurrentLevel() {
- List tmpValues = new ArrayList()
- tmpValues.add(speechSynthesises[0].getCurrentLevel())
- return tmpValues
- }
-
}
}