Feature/fix kwh neo coolcam nas wr01 ze #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Actually, I created this PR as OpenZWave#2598, but the OpenZWave project seems to quite slow in processing PRs.
The Neo Coolcam NAS-WR01ZE randomly reports kWh value with the most significant bit set. This results in erroneous negative readings:
OZW expects a 32-bit signed int, hence the negative readings. According to the docs of this device, the maximum report value is 21474836.47 kWh, which is
0x7FFFFFFF
. This PR resets resets the most significant bit to 0. This results in: