Skip to content

Commit

Permalink
[ICP-13555] EZEX power meter patch. (SmartThingsCommunity#41807)
Browse files Browse the repository at this point in the history
[ICP-13555] EZEX power meter patch.
  • Loading branch information
juhaki authored Aug 25, 2020
1 parent 7450d08 commit 04a3c16
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 04a3c16

Please sign in to comment.