From 51979f0030fa482affd6e2944aa81ebd93af14e2 Mon Sep 17 00:00:00 2001 From: Zach Varberg Date: Wed, 16 Nov 2016 10:44:48 -0600 Subject: [PATCH] Fix broken generation of smartsense-motion events When the change went out to allow messages to be passed up to the cloud the smartsense-motion DTH was broken with the changes for https://smartthings.atlassian.net/browse/DPROT-200 --- .../smartsense-motion.src/smartsense-motion.groovy | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/devicetypes/smartthings/smartsense-motion.src/smartsense-motion.groovy b/devicetypes/smartthings/smartsense-motion.src/smartsense-motion.groovy index 5cf3743..5d60112 100644 --- a/devicetypes/smartthings/smartsense-motion.src/smartsense-motion.groovy +++ b/devicetypes/smartthings/smartsense-motion.src/smartsense-motion.groovy @@ -57,6 +57,7 @@ def parse(String description) { private Map parseBasicMessage(description) { def name = parseName(description) + def results = [:] if (name != null) { def value = parseValue(description) def linkText = getLinkText(device) @@ -64,7 +65,7 @@ private Map parseBasicMessage(description) { def handlerName = value def isStateChange = isStateChange(device, name, value) - def results = [ + results = [ name : name, value : value, linkText : linkText, @@ -73,8 +74,6 @@ private Map parseBasicMessage(description) { isStateChange : isStateChange, displayed : displayed(description, isStateChange) ] - } else { - results = [:] } log.debug "Parse returned $results.descriptionText" return results