Skip to content

Commit

Permalink
remove old code, which also scaled unit: % values and not only unit: …
Browse files Browse the repository at this point in the history
…100 %

- should fix jens-maus/RaspberryMatic#1269
  • Loading branch information
foxriver76 committed May 14, 2021
1 parent 990a799 commit d730d27
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ with the ioBroker CLI. You can change the port via `iob set hm-rega.<instance> -
Placeholder for the next version (at the beginning of the line):
### __WORK IN PROGRESS__
-->

### __WORK IN PROGRESS__
* (foxriver76) remove old code, which also scaled unit: % values and not only unit: 100 %

### 3.0.24 (2021-04-30)
* (foxriver76) we fixed more occurrences of incorrect types (fixes #146)

Expand Down
2 changes: 1 addition & 1 deletion hm-rega.js
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,7 @@ async function getDatapoints() {
// round to xx.yy
data[dp] = Math.round(data[dp] * 100) / 100;
}
} else if (units[id] === '100%' || units[id] === '%') {
} else if (units[id] === '100%') {
data[dp] = Math.round(parseFloat(data[dp]) * 100 * 1000) / 1000;
}

Expand Down

0 comments on commit d730d27

Please sign in to comment.