Hello.
I want to pass 3 attributes from my SmartApp to DHT.
Now, I’m able to sent an attribute using:
settings.target.parse(“attr1: ${value1}”)
command on SmartApp.
On DHT site the code is the:
def parse(String message) {
Map msg = stringToMap(message)
Float temp = msg.attr1.toFloat()
def event = [
name : "attr1",
value : temp.round(2),
unit : “unit", //scale,
]
}
Can I pass these tree attributes by issuing the command:
settings.target.parse(“attr1: ${value1}”,“attr2: ${value2}”,“attr3: ${value3}”)
I tried but I got this error:
groovy.lang.MissingMethodException: No signature of method: script_dth_ccef3addb0cab668417f9cb6e1fea649e10faa190aa4df8a52db1da0e45a8eae.parse() is applicable for argument types: (org.codehaus.groovy.runtime.GStringImpl, org.codehaus.groovy.runtime.GStringImpl, org.codehaus.groovy.runtime.GStringImpl) values: [eq: 0.25, c: 38, ac: 23.44] Possible solutions: pages(), page(), parse(java.lang.String), tiles(), wait(), run() @line 67 (doCall)
any suggestions?