Skip to content

Commit

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

Rolling down staging to master
  • Loading branch information
greens authored Aug 25, 2020
2 parents 7b0d046 + 04a3c16 commit 8706969
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,13 @@ def parse(String description) {
if (event) {
log.info event
if (event.name == "power") {
event.value = event.value/1000
event.unit = "W"
if (event.cluster == 0x0B04 && event.attrId == 0x050b) {
event.value = event.value
event.unit = "W"
} else {
event.value = event.value/1000
event.unit = "W"
}
} else if (event.name == "energy") {
event.value = event.value/1000000
event.unit = "kWh"
Expand Down

0 comments on commit 8706969

Please sign in to comment.