From 89335104365fc8775c5e26daa61ede8746c25327 Mon Sep 17 00:00:00 2001 From: Duncan McKee Date: Wed, 24 Feb 2016 18:07:48 -0500 Subject: [PATCH] Send associationSet to Enerwave Motion on wake only when it isn't already working --- .../zwave-motion-sensor.src/zwave-motion-sensor.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devicetypes/smartthings/zwave-motion-sensor.src/zwave-motion-sensor.groovy b/devicetypes/smartthings/zwave-motion-sensor.src/zwave-motion-sensor.groovy index 4015be3..8618631 100644 --- a/devicetypes/smartthings/zwave-motion-sensor.src/zwave-motion-sensor.groovy +++ b/devicetypes/smartthings/zwave-motion-sensor.src/zwave-motion-sensor.groovy @@ -120,7 +120,7 @@ def zwaveEvent(physicalgraph.zwave.commands.wakeupv1.WakeUpNotification cmd) { def result = [createEvent(descriptionText: "${device.displayName} woke up", isStateChange: false)] - if (msr == "011A-0601-0901") { // Enerwave motion doesn't always get the associationSet that the hub sends on join + if (state.MSR == "011A-0601-0901" && device.currentState('motion') == null) { // Enerwave motion doesn't always get the associationSet that the hub sends on join result << response(zwave.associationV1.associationSet(groupingIdentifier:1, nodeId:zwaveHubNodeId)) } if (!state.lastbat || (new Date().time) - state.lastbat > 53*60*60*1000) {