Do not delete all binding table entries

There was a bug when comparing the destination address for binding table
entries that would cause all binding table entries to be deleted.  This
fixes that.

This is a fix for: https://smartthings.atlassian.net/browse/DVCSMP-2175
This commit is contained in:
Zach Varberg
2016-11-14 14:34:53 -06:00
parent 3d88fc0413
commit 65bb10d6d6

View File

@@ -88,7 +88,7 @@ def parse(String description) {
List<String> cmds = []
bindingTable.table_entries.inject(cmds) { acc, entry ->
// The binding entry is not for our hub and should be deleted
if (entry["dstAddr"] != zigbeeEui) {
if (entry["dstAddr"] != zigbee.zigbeeEui) {
acc.addAll(removeBinding(entry.clusterId, entry.srcAddr, entry.srcEndpoint, entry.dstAddr, entry.dstEndpoint))
}
acc