Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ metadata {
capability "Refresh"
capability "Sensor"

// heartbeat is updated every time device checks in
attribute "heartbeat", "string"

fingerprint profileId: "0104", inClusters: "0000,0003,0004,0005,0006,0B04,0B05", outClusters: "0019"
}

Expand Down Expand Up @@ -62,6 +65,9 @@ def parse(String description) {
name = "power"
// assume 16 bit signed for encoding and power divisor is 10
value = Integer.parseInt(reportValue, 16) / 10

// trigger heartbeat
sendEvent(name: "heartbeat", value: "alive", isStateChange: true, displayed:false)
}
} else if (description?.startsWith("on/off:")) {
log.debug "Switch command"
Expand Down