From 290a9d4377111257644cbbc0e5841c5516e0739c Mon Sep 17 00:00:00 2001 From: Przemyslaw Kacprowicz Date: Tue, 20 Aug 2019 08:51:28 +0200 Subject: [PATCH 1/2] Added missing clearTamper() method --- .../zooz-4-in-1-sensor.src/zooz-4-in-1-sensor.groovy | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/devicetypes/smartthings/zooz-4-in-1-sensor.src/zooz-4-in-1-sensor.groovy b/devicetypes/smartthings/zooz-4-in-1-sensor.src/zooz-4-in-1-sensor.groovy index dea40f51322..d929ac9b628 100644 --- a/devicetypes/smartthings/zooz-4-in-1-sensor.src/zooz-4-in-1-sensor.groovy +++ b/devicetypes/smartthings/zooz-4-in-1-sensor.src/zooz-4-in-1-sensor.groovy @@ -204,6 +204,10 @@ def configure() { secureSequence(request) + ["delay 20000", zwave.wakeUpV2.wakeUpNoMoreInformation().format()] } +def clearTamper() { + sendEvent(name: "tamper", value: "clear") +} + private getLuxFromPercentage(percentageValue) { def multiplier = luxConversionData.find { percentageValue >= it.min && percentageValue <= it.max From 5cad16f77a65c0e0a6489c0c2172ea22d5e4643d Mon Sep 17 00:00:00 2001 From: Przemyslaw Kacprowicz Date: Tue, 20 Aug 2019 12:37:58 +0200 Subject: [PATCH 2/2] Removed unschedule, added 'overwrite' flag. --- .../zooz-4-in-1-sensor.src/zooz-4-in-1-sensor.groovy | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/devicetypes/smartthings/zooz-4-in-1-sensor.src/zooz-4-in-1-sensor.groovy b/devicetypes/smartthings/zooz-4-in-1-sensor.src/zooz-4-in-1-sensor.groovy index d929ac9b628..2a31dace80e 100644 --- a/devicetypes/smartthings/zooz-4-in-1-sensor.src/zooz-4-in-1-sensor.groovy +++ b/devicetypes/smartthings/zooz-4-in-1-sensor.src/zooz-4-in-1-sensor.groovy @@ -171,8 +171,7 @@ def zwaveEvent(physicalgraph.zwave.commands.notificationv3.NotificationReport cm result = motionEvent(cmd.notificationStatus) } else if (cmd.notificationType == 7 && cmd.event == 3) { result = createEvent(name: "tamper", value: "detected", descriptionText: "$device.displayName was tampered") - unschedule(clearTamper, [forceForLocallyExecuting: true]) - runIn(10, clearTamper, [forceForLocallyExecuting: true]) + runIn(10, clearTamper, [overwrite: true, forceForLocallyExecuting: true]) } else if (cmd.notificationType == 7 && cmd.event == 0) { if (cmd.eventParameter[0] == 8) { result = motionEvent(0)