From ef47ec93938aa13ce98cc46e20bf6b6c562f0e69 Mon Sep 17 00:00:00 2001 From: Vinay Rao Date: Wed, 17 Aug 2016 18:21:54 -0700 Subject: [PATCH] hotfix for level jumping issues --- .../smartthings/zigbee-dimmer.src/zigbee-dimmer.groovy | 5 ++++- .../smartthings/zigbee-rgbw-bulb.src/zigbee-rgbw-bulb.groovy | 5 ++++- .../zigbee-white-color-temperature-bulb.groovy | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/devicetypes/smartthings/zigbee-dimmer.src/zigbee-dimmer.groovy b/devicetypes/smartthings/zigbee-dimmer.src/zigbee-dimmer.groovy index 72809f5..666a1ec 100644 --- a/devicetypes/smartthings/zigbee-dimmer.src/zigbee-dimmer.groovy +++ b/devicetypes/smartthings/zigbee-dimmer.src/zigbee-dimmer.groovy @@ -53,7 +53,10 @@ def parse(String description) { def event = zigbee.getEvent(description) if (event) { - sendEvent(event) + if (event.name=="level" && event.value==0) {} + else { + sendEvent(event) + } } else { log.warn "DID NOT PARSE MESSAGE for description : $description" diff --git a/devicetypes/smartthings/zigbee-rgbw-bulb.src/zigbee-rgbw-bulb.groovy b/devicetypes/smartthings/zigbee-rgbw-bulb.src/zigbee-rgbw-bulb.groovy index ade4987..a1d3b49 100644 --- a/devicetypes/smartthings/zigbee-rgbw-bulb.src/zigbee-rgbw-bulb.groovy +++ b/devicetypes/smartthings/zigbee-rgbw-bulb.src/zigbee-rgbw-bulb.groovy @@ -81,7 +81,10 @@ def parse(String description) { def finalResult = zigbee.getEvent(description) if (finalResult) { log.debug finalResult - sendEvent(finalResult) + if (finalResult.name=="level" && finalResult.value==0) {} + else { + sendEvent(finalResult) + } } else { def zigbeeMap = zigbee.parseDescriptionAsMap(description) diff --git a/devicetypes/smartthings/zigbee-white-color-temperature-bulb.src/zigbee-white-color-temperature-bulb.groovy b/devicetypes/smartthings/zigbee-white-color-temperature-bulb.src/zigbee-white-color-temperature-bulb.groovy index 50f270d..eda7009 100644 --- a/devicetypes/smartthings/zigbee-white-color-temperature-bulb.src/zigbee-white-color-temperature-bulb.groovy +++ b/devicetypes/smartthings/zigbee-white-color-temperature-bulb.src/zigbee-white-color-temperature-bulb.groovy @@ -75,7 +75,10 @@ def parse(String description) { log.debug "description is $description" def event = zigbee.getEvent(description) if (event) { - sendEvent(event) + if (event.name=="level" && event.value==0) {} + else { + sendEvent(event) + } } else { log.warn "DID NOT PARSE MESSAGE for description : $description"