mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-03-08 05:31:56 +00:00
Merge pull request #1489 from SmartThingsCommunity/staging
Rolling down staging hotfix to master
This commit is contained in:
@@ -120,6 +120,15 @@ def configure() {
|
||||
return cmd
|
||||
}
|
||||
|
||||
|
||||
def installed() {
|
||||
initialize()
|
||||
}
|
||||
|
||||
def updated() {
|
||||
initialize()
|
||||
}
|
||||
|
||||
def initialize() {
|
||||
sendEvent(name: "numberOfButtons", value: 4)
|
||||
}
|
||||
|
||||
@@ -109,6 +109,15 @@ def configure() {
|
||||
return cmds
|
||||
}
|
||||
|
||||
|
||||
def installed() {
|
||||
initialize()
|
||||
}
|
||||
|
||||
def updated() {
|
||||
initialize()
|
||||
}
|
||||
|
||||
def initialize() {
|
||||
sendEvent(name: "numberOfButtons", value: 4)
|
||||
}
|
||||
|
||||
@@ -183,6 +183,15 @@ def updateState(String name, String value) {
|
||||
device.updateDataValue(name, value)
|
||||
}
|
||||
|
||||
|
||||
def installed() {
|
||||
initialize()
|
||||
}
|
||||
|
||||
def updated() {
|
||||
initialize()
|
||||
}
|
||||
|
||||
def initialize() {
|
||||
sendEvent(name: "numberOfButtons", value: 3)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -126,6 +126,15 @@ private hold(button) {
|
||||
sendEvent(name: "button", value: "held", data: [buttonNumber: button], descriptionText: "$device.displayName button $button was held", isStateChange: true)
|
||||
}
|
||||
|
||||
|
||||
def installed() {
|
||||
initialize()
|
||||
}
|
||||
|
||||
def updated() {
|
||||
initialize()
|
||||
}
|
||||
|
||||
def initialize() {
|
||||
sendEvent(name: "numberOfButtons", value: 4)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user