We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f4b310 commit 13a7aebCopy full SHA for 13a7aeb
predbat-table-card.js
@@ -1268,9 +1268,9 @@ class PredbatTableCard extends HTMLElement {
1268
let pvValue = newTRObject[headerClassesArray[5]].value.replace(/[☀]/g, '');
1269
if(pvValue.length === 0)
1270
pvValue = 0;
1271
- const netPower = (parseFloat(newTRObject[headerClassesArray[6]].value) - parseFloat(pvValue)).toFixed(2);
+ const netPower = (parseFloat(pvValue) - parseFloat(newTRObject[headerClassesArray[6]].value)).toFixed(2);
1272
let adjustedColor;
1273
- if(netPower < 0){
+ if(netPower > 0){
1274
if(this.getLightMode(hassDarkMode) === false && this.config.old_skool !== true){
1275
adjustedColor = this.getDarkenHexColor("#3AEE85", 30);
1276
} else {
0 commit comments