From 6448a5bc7cd9f03853e8591b07a884befcf96d03 Mon Sep 17 00:00:00 2001 From: Vinay Rao Date: Wed, 12 Apr 2017 16:51:44 -0700 Subject: [PATCH] adding centralite zigbee button fingerprint number of button handling --- .../zigbee-button.src/zigbee-button.groovy | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/devicetypes/smartthings/zigbee-button.src/zigbee-button.groovy b/devicetypes/smartthings/zigbee-button.src/zigbee-button.groovy index f3e04f1..f7e2064 100644 --- a/devicetypes/smartthings/zigbee-button.src/zigbee-button.groovy +++ b/devicetypes/smartthings/zigbee-button.src/zigbee-button.groovy @@ -28,6 +28,7 @@ metadata { command "enrollResponse" fingerprint inClusters: "0000, 0001, 0003, 0020, 0402, 0B05", outClusters: "0003, 0006, 0008, 0019", manufacturer: "OSRAM", model: "LIGHTIFY Dimming Switch", deviceJoinName: "OSRAM LIGHTIFY Dimming Switch" + fingerprint inClusters: "0000, 0001, 0003, 0020, 0402, 0B05", outClusters: "0003, 0006, 0008, 0019", manufacturer: "CentraLite", model: "3130", deviceJoinName: "Centralite Zigbee Smart Switch" //fingerprint inClusters: "0000, 0001, 0003, 0020, 0500", outClusters: "0003,0019", manufacturer: "CentraLite", model: "3455-L", deviceJoinName: "Iris Care Pendant" fingerprint inClusters: "0000, 0001, 0003, 0007, 0020, 0402, 0B05", outClusters: "0003, 0006, 0019", manufacturer: "CentraLite", model: "3460-L", deviceJoinName: "Iris Smart Button" fingerprint inClusters: "0000, 0001, 0003, 0007, 0020, 0B05", outClusters: "0003, 0006, 0019", manufacturer: "CentraLite", model:"3450-L", deviceJoinName: "Iris KeyFob" @@ -251,12 +252,19 @@ def initialize() { if ((device.getDataValue("manufacturer") == "OSRAM") && (device.getDataValue("model") == "LIGHTIFY Dimming Switch")) { sendEvent(name: "numberOfButtons", value: 2) } - else if ((device.getDataValue("manufacturer") == "CentraLite") && - ((device.getDataValue("model") == "3455-L") || (device.getDataValue("model") == "3460-L"))) { - sendEvent(name: "numberOfButtons", value: 1) - } - else if ((device.getDataValue("manufacturer") == "CentraLite") && (device.getDataValue("model") == "3450-L")) { - sendEvent(name: "numberOfButtons", value: 4) + else if (device.getDataValue("manufacturer") == "CentraLite") { + if (device.getDataValue("model") == "3130") { + sendEvent(name: "numberOfButtons", value: 2) + } + else if ((device.getDataValue("model") == "3455-L") || (device.getDataValue("model") == "3460-L")) { + sendEvent(name: "numberOfButtons", value: 1) + } + else if (device.getDataValue("model") == "3450-L") { + sendEvent(name: "numberOfButtons", value: 4) + } + else { + sendEvent(name: "numberOfButtons", value: 4) //default case. can be changed later. + } } else { //default. can be changed