mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-03-08 21:02:56 +00:00
changes suggested by Tom and Zach
This commit is contained in:
@@ -119,36 +119,31 @@ private Map parseNonIasButtonMessage(Map descMap){
|
||||
def buttonState = ""
|
||||
def buttonNumber = 0
|
||||
if ((device.getDataValue("model") == "3460-L") &&(descMap.clusterInt == 0x0006)) {
|
||||
if (descMap.command == "01") {
|
||||
if (descMap.commandInt == 1) {
|
||||
getButtonResult("press")
|
||||
}
|
||||
else if (descMap.command == "00") {
|
||||
else if (descMap.commandInt == 0) {
|
||||
getButtonResult("release")
|
||||
}
|
||||
}
|
||||
else if ((device.getDataValue("model") == "3450-L") && (descMap.clusterInt == 0x0006)) {
|
||||
log.info "For 3450-L"
|
||||
log.trace "descMap : $descMap"
|
||||
if (descMap.command == "01") {
|
||||
if (descMap.commandInt == 1) {
|
||||
getButtonResult("press")
|
||||
}
|
||||
else if (descMap.command == "00") {
|
||||
def button = 1
|
||||
else if (descMap.commandInt == 0) {
|
||||
def button = 1
|
||||
switch(descMap.sourceEndpoint) {
|
||||
case "01":
|
||||
button = 4
|
||||
case "01":
|
||||
button = 4
|
||||
break
|
||||
case "02":
|
||||
button = 3
|
||||
button = 3
|
||||
break
|
||||
case "03":
|
||||
button = 1
|
||||
button = 1
|
||||
break
|
||||
case "04":
|
||||
button = 2
|
||||
break
|
||||
default:
|
||||
button = 1
|
||||
button = 2
|
||||
break
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user