From 71c29b2aca3c4372aad48dd1c83a36d41b687e9b Mon Sep 17 00:00:00 2001 From: Donald Kirker Date: Wed, 14 Nov 2018 15:47:28 -0800 Subject: [PATCH] WWST-1595 Add buttonNumber to button events (#3680) --- .../zigbee-accessory-dimmer.groovy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/devicetypes/smartthings/zigbee-accessory-dimmer.src/zigbee-accessory-dimmer.groovy b/devicetypes/smartthings/zigbee-accessory-dimmer.src/zigbee-accessory-dimmer.groovy index 9bff1ba5094..ae57c02b748 100644 --- a/devicetypes/smartthings/zigbee-accessory-dimmer.src/zigbee-accessory-dimmer.groovy +++ b/devicetypes/smartthings/zigbee-accessory-dimmer.src/zigbee-accessory-dimmer.groovy @@ -91,9 +91,9 @@ def parse(String description) { } } else if (descMap && descMap.clusterInt == 0x0005) { if (descMap.commandInt == 0x05) { - sendEvent(name: "button", value: "pushed", isStateChange: true) + sendEvent(name: "button", value: "pushed", data: [buttonNumber: 1], isStateChange: true) } else if (descMap.commandInt == 0x04) { - sendEvent(name: "button", value: "held", isStateChange: true) + sendEvent(name: "button", value: "held", data: [buttonNumber: 1], isStateChange: true) } } else { log.warn "DID NOT PARSE MESSAGE for description : $description" @@ -122,7 +122,7 @@ def setLevel(value) { def installed() { sendEvent(name: "switch", value: "on", isStateChange: false, displayed: false) sendEvent(name: "level", value: 100, isStateChange: false, displayed: false) - sendEvent(name: "button", value: "pushed", isStateChange: false, displayed: false) + sendEvent(name: "button", value: "pushed", data: [buttonNumber: 1], isStateChange: false, displayed: false) sendEvent(name: "numberOfButtons", value: 1, displayed: false) }