mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-03-17 21:03:30 +00:00
Merge pull request #1636 from workingmonk/bug/zigbee_button_iris
DVCSMP-2391 Iris 4 button device mapping to button 1 only
This commit is contained in:
@@ -118,15 +118,38 @@ private Map getBatteryResult(rawValue) {
|
|||||||
private Map parseNonIasButtonMessage(Map descMap){
|
private Map parseNonIasButtonMessage(Map descMap){
|
||||||
def buttonState = ""
|
def buttonState = ""
|
||||||
def buttonNumber = 0
|
def buttonNumber = 0
|
||||||
if (((device.getDataValue("model") == "3460-L") || (device.getDataValue("model") == "3450-L"))
|
if ((device.getDataValue("model") == "3460-L") &&(descMap.clusterInt == 0x0006)) {
|
||||||
&&(descMap.clusterInt == 0x0006)) {
|
if (descMap.commandInt == 1) {
|
||||||
if (descMap.command == "01") {
|
|
||||||
getButtonResult("press")
|
getButtonResult("press")
|
||||||
}
|
}
|
||||||
else if (descMap.command == "00") {
|
else if (descMap.commandInt == 0) {
|
||||||
getButtonResult("release")
|
getButtonResult("release")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if ((device.getDataValue("model") == "3450-L") && (descMap.clusterInt == 0x0006)) {
|
||||||
|
if (descMap.commandInt == 1) {
|
||||||
|
getButtonResult("press")
|
||||||
|
}
|
||||||
|
else if (descMap.commandInt == 0) {
|
||||||
|
def button = 1
|
||||||
|
switch(descMap.sourceEndpoint) {
|
||||||
|
case "01":
|
||||||
|
button = 4
|
||||||
|
break
|
||||||
|
case "02":
|
||||||
|
button = 3
|
||||||
|
break
|
||||||
|
case "03":
|
||||||
|
button = 1
|
||||||
|
break
|
||||||
|
case "04":
|
||||||
|
button = 2
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
getButtonResult("release", button)
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (descMap.clusterInt == 0x0006) {
|
else if (descMap.clusterInt == 0x0006) {
|
||||||
buttonState = "pushed"
|
buttonState = "pushed"
|
||||||
if (descMap.command == "01") {
|
if (descMap.command == "01") {
|
||||||
|
|||||||
Reference in New Issue
Block a user