Skip to content

Commit

Permalink
Merge pull request SmartThingsCommunity#42523 from SmartThingsCommuni…
Browse files Browse the repository at this point in the history
…ty/acceptance

Rolling up acceptance to production for deploy
  • Loading branch information
greens authored Sep 1, 2020
2 parents 1ce5b84 + 734d5dc commit 9769679
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ def parse(String description) {
if (event) {
log.info event
if (event.name == "power") {
if (event.cluster == 0x0B04 && event.attrId == 0x050b) {
event.value = event.value
def descMap = zigbee.parseDescriptionAsMap(description)
log.debug "event : Desc Map: $descMap"
if (descMap.clusterInt == 0x0B04 && descMap.attrInt == 0x050b) {
event.value = event.value/10
event.unit = "W"
} else {
event.value = event.value/1000
Expand Down Expand Up @@ -82,6 +84,12 @@ def parse(String description) {
map.value = zigbee.convertHexToInt(it.value)/1000
map.unit = "W"
}
if (it.clusterInt == 0x0B04 && it.attrInt == 0x050b) {
log.debug "meter"
map.name = "power"
map.value = zigbee.convertHexToInt(it.value)/10
map.unit = "W"
}
if (it.clusterInt == 0x0702 && it.attrInt == 0x0000) {
log.debug "energy"
map.name = "energy"
Expand Down

0 comments on commit 9769679

Please sign in to comment.