Skip to content

Commit 2b3ccf5

Browse files
authored
Update predbat-table-card.js
Further improvements for PredBat's new "Export" terminology
1 parent 8e4e16f commit 2b3ccf5

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

predbat-table-card.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -355,19 +355,19 @@ class PredbatTableCard extends HTMLElement {
355355
if(theItem.value === "Both-Chg" || theItem.value === "Both-Dis" || theItem.value === "Both-Idle")
356356
chargeString = "";
357357

358-
let dischargeString = "Discharge";
358+
let dischargeString = "Export";
359359

360360
//console.log("1: " + dischargeString);
361361

362362
if(this.isSmallScreen() && (this.config.use_friendly_states === false || this.config.use_friendly_states === undefined)){
363363

364364
if(theItem.value === "Both") {
365365
chargeString = "Chg";
366-
dischargeString = "Dis";
366+
dischargeString = "Exp";
367367
}
368368

369369
if(theItem.value === "Both-Chg" || theItem.value === "Both-Dis" || theItem.value === "Both-Idle") {
370-
dischargeString = "Dis";
370+
dischargeString = "Exp";
371371
}
372372

373373
newCell.style.minWidth = "110px";
@@ -475,11 +475,12 @@ class PredbatTableCard extends HTMLElement {
475475
}
476476

477477
friendlyText = friendlyText.replace('FreezeDis', 'Charging Paused');
478+
friendlyText = friendlyText.replace('FreezeExp', 'Charging Paused');
478479
friendlyText = friendlyText.replace('FreezeChrg', 'Maintaining SOC'); //FreezeChrg
479480
friendlyText = friendlyText.replace('HoldChrg', 'Maintaining SOC'); //HoldChrg
480481
friendlyText = friendlyText.includes("NoCharge") ? friendlyText.replace('NoCharge','Charge to "limit"') : friendlyText.replace('Charge', 'Planned Charge');
481482
friendlyText = friendlyText.replace('Discharge', 'Planned Export'); //Discharge
482-
483+
friendlyText = friendlyText.replace('Export', 'Planned Export'); //Discharge
483484
}
484485

485486
if(this.config.use_friendly_states === true){
@@ -760,9 +761,9 @@ class PredbatTableCard extends HTMLElement {
760761
if(status === "FrzDis")
761762
newState = "FreezeDis";
762763
if(status === "FrzExp")
763-
newState = "FreezeDis";
764+
newState = "FreezeExp";
764765
if(status === "Exp")
765-
newState = "Discharge";
766+
newState = "Export";
766767
if(status === "Dis")
767768
newState = "Discharge";
768769
if(status === "Dis ⅎ")

0 commit comments

Comments
 (0)