mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-04-02 06:13:07 +01:00
Modifying 'Publication Requests for Lumi Touch Switch, Dimmer and Shade'
This commit is contained in:
@@ -80,7 +80,7 @@ def parse(String description) {
|
|||||||
else if (finalResult.type == "level") {
|
else if (finalResult.type == "level") {
|
||||||
sendEvent(name: "level", value: finalResult.value)
|
sendEvent(name: "level", value: finalResult.value)
|
||||||
sendEvent(name: "levelControl", value: finalResult.value)
|
sendEvent(name: "levelControl", value: finalResult.value)
|
||||||
if (finalResult.value == 100) {
|
if (finalResult.value == 0) {
|
||||||
sendEvent(name: "switch", value: "off")
|
sendEvent(name: "switch", value: "off")
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -98,13 +98,13 @@ def parse(String description) {
|
|||||||
def off() {
|
def off() {
|
||||||
log.debug "0x${device.deviceNetworkId} Endpoint ${endpointId}"
|
log.debug "0x${device.deviceNetworkId} Endpoint ${endpointId}"
|
||||||
sendEvent(name: "level", value: "100")
|
sendEvent(name: "level", value: "100")
|
||||||
sendEvent(name: "levelControl", value: "100")
|
sendEvent(name: "levelControl", value: "0")
|
||||||
"st cmd 0x${device.deviceNetworkId} ${endpointId} 0x0006 0 {}"
|
"st cmd 0x${device.deviceNetworkId} ${endpointId} 0x0006 0 {}"
|
||||||
}
|
}
|
||||||
|
|
||||||
def on() {
|
def on() {
|
||||||
log.debug "0x${device.deviceNetworkId} Endpoint ${endpointId}"
|
log.debug "0x${device.deviceNetworkId} Endpoint ${endpointId}"
|
||||||
sendEvent(name: "level", value: "0")
|
sendEvent(name: "level", value: "100")
|
||||||
sendEvent(name: "levelControl", value: "0")
|
sendEvent(name: "levelControl", value: "0")
|
||||||
"st cmd 0x${device.deviceNetworkId} ${endpointId} 0x0006 1 {}"
|
"st cmd 0x${device.deviceNetworkId} ${endpointId} 0x0006 1 {}"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user