def data = eventDataMap["data"]
for (int i = 0;i < app2.eventList.size();i++) {
- if (app2.eventList[i] == name) {
+ if (app2.eventList[i] == name &&
+ (app2.valueList[i] == "" || app2.valueList == value)) {
def event = new Event(value, name, deviceId, descriptionText, displayed, linkText, linkText, isStateChange, unit, data)
if (app2.functionList[i] instanceof String) {
String toCall = app2.functionList[i]
}
for (int i = 0;i < app1.eventList.size();i++) {
- if (app1.eventList[i] == name) {
- def event = new Event(value, name, deviceId, descriptionText, displayed, linkText, linkText, isStateChange, unit, data)
+ if (app1.eventList[i] == name &&
+ (app1.valueList[i] == "" || app1.valueList == value)) {
+ def event = new Event(value, name, deviceId, descriptionText, displayed, linkText, linkText, isStateChange, unit, data)
if (app1.functionList[i] instanceof String) {
String toCall = app1.functionList[i]
app1."$toCall"(event)