Skip to content

Commit

Permalink
[UPDATE] v1.2 Ready to use
Browse files Browse the repository at this point in the history
changelist
* Fixed incorrect code used to calculate kiloWatt/hour energy usage (thanks for @Tiago_Goncalves for spotting the issue)
* Added lastCheckinDate attribute for Epoch time/date stamp events that can be used with WebCoRE
* Added Temperature Offset preference setting
* Added device name to all debug messages
* Improved `refresh` command function
* Improved text of debug messages for clarity
* Removed unnecessary / unused code in `parse()`
* Minor code reformatting
  • Loading branch information
veeceeoh committed Apr 4, 2019
1 parent efcdfd7 commit 63a6963
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ private Map parseReportAttributeMessage(String description) {
else if (descMap.cluster == "000C" && descMap.attrId == "0055" && descMap.endpoint == "03") {
def energy_int = Long.parseLong(descMap.value, 16)
def energy = Float.intBitsToFloat(energy_int.intValue())
energy = Math.round(energy * 100) * 0.001
energy = Math.round(energy * 100) * 0.0001
resultMap = createEvent(name: "energy", value: energy, unit: 'kWh')
log.debug "${device.displayName}: Reported energy usage is ${energy}kWh"
}
Expand Down

0 comments on commit 63a6963

Please sign in to comment.