Skip to content

Commit c7092ce

Browse files
author
NoBl
committed
changed floatingpoint for alltime stats
1 parent e247ee7 commit c7092ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ class Senec extends utils.Adapter {
480480
await this.doState(pfx + key + " (k"+ value.einheit + ")", Number((value.wert / 1000).toFixed(2)), "", "k" + value.einheit, false);
481481
}
482482
}
483-
if (period == api_trans["THIS_YEAR"].dp) await this.insertAllTimeHistory(system, key, new Date(obj.aggregation.startzeitpunkt).getFullYear(), Number((value.wert).toFixed(2)), value.einheit);
483+
if (period == api_trans["THIS_YEAR"].dp) await this.insertAllTimeHistory(system, key, new Date(obj.aggregation.startzeitpunkt).getFullYear(), Number((value.wert).toFixed(0)), value.einheit);
484484
}
485485
}
486486
const autarky = Number((((obj.aggregation.stromerzeugung.wert - obj.aggregation.netzeinspeisung.wert - obj.aggregation.speicherbeladung.wert + obj.aggregation.speicherentnahme.wert) / obj.aggregation.stromverbrauch.wert) * 100).toFixed(2));
@@ -526,7 +526,7 @@ class Senec extends utils.Adapter {
526526
if (kiloList.includes(einheit)) {
527527
await this.doState(pfx + key, Number((sum / 1000).toFixed(0)), "", "k" + einheit, false);
528528
} else {
529-
await this.doState(pfx + key, Number(sum.toFixed(2)), "", einheit, false);
529+
await this.doState(pfx + key, Number(sum.toFixed(0)), "", einheit, false);
530530
}
531531
}
532532
const autarky = Number((((sums.stromerzeugung - sums.netzeinspeisung - sums.speicherbeladung + sums.speicherentnahme) / sums.stromverbrauch) * 100).toFixed(0));

0 commit comments

Comments
 (0)