diff --git a/assets/js/components/VehicleStatus.test.js b/assets/js/components/VehicleStatus.test.js index 0edc8057c..d4eb1190a 100644 --- a/assets/js/components/VehicleStatus.test.js +++ b/assets/js/components/VehicleStatus.test.js @@ -131,18 +131,18 @@ describe("timer", () => { { remaining: "1:30m" } ); }); - test("show guard enable timer if it exists", () => { + test("show guard timer if it exists", () => { expectStatus( { guardAction: "enable", connected: true, guardRemainingInterpolated: 90, }, - "guardEnable", + "guard", { remaining: "1:30m" } ); }); - test("don't show guard enable timer if charging", () => { + test("don't show guard timer if charging", () => { expectStatus( { guardAction: "enable", @@ -153,29 +153,6 @@ describe("timer", () => { "charging" ); }); - test("show guard disable timer if it exists", () => { - expectStatus( - { - guardAction: "disable", - connected: true, - charging: true, - guardRemainingInterpolated: 90, - }, - "guardDisable", - { remaining: "1:30m" } - ); - }); - test("don't show guard disable timer if not charging", () => { - expectStatus( - { - guardAction: "disable", - connected: true, - charging: false, - guardRemainingInterpolated: 90, - }, - "connected" - ); - }); }); describe("vehicle target soc", () => { diff --git a/assets/js/components/VehicleStatus.vue b/assets/js/components/VehicleStatus.vue index ab9461d4d..4755cc0fd 100644 --- a/assets/js/components/VehicleStatus.vue +++ b/assets/js/components/VehicleStatus.vue @@ -44,10 +44,7 @@ export default { ); }, guardTimerActive() { - return ( - this.guardRemainingInterpolated > 0 && - ["enable", "disable"].includes(this.guardAction) - ); + return this.guardRemainingInterpolated > 0 && this.guardAction === "enable"; }, isCo2() { return this.smartCostUnit === CO2_UNIT; @@ -119,18 +116,12 @@ export default { }); } - if (this.guardTimerActive && this.charging && this.guardAction === "disable") { - return t("guardDisable", { - remaining: this.fmtShortDuration(this.guardRemainingInterpolated, true), - }); - } - if (this.charging) { return t("charging"); } - if (this.guardTimerActive && this.guardAction === "enable") { - return t("guardEnable", { + if (this.guardTimerActive) { + return t("guard", { remaining: this.fmtShortDuration(this.guardRemainingInterpolated, true), }); } diff --git a/i18n/de.toml b/i18n/de.toml index 442f344db..9956754f1 100644 --- a/i18n/de.toml +++ b/i18n/de.toml @@ -247,8 +247,7 @@ cleanEnergyCharging = "Saubere Energie verfügbar. Ladevorgang aktiv…" climating = "Vorklimatisierung erkannt." connected = "Verbunden." disconnected = "Nicht verbunden." -guardDisable = "Pausiere in {remaining}…" -guardEnable = "Starte in {remaining}…" +guard = "Starte in {remaining}…" minCharge = "Mindestladung bis {soc}%." pvDisable = "Zu wenig Überschuss. Pausiere in {remaining}…" pvEnable = "Überschuss verfügbar. Starte in {remaining}…" diff --git a/i18n/en.toml b/i18n/en.toml index 11a554e44..195681e21 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -247,8 +247,7 @@ cleanEnergyCharging = "Clean energy available. Charging…" climating = "Pre-conditioning detected." connected = "Connected." disconnected = "Disconnected." -guardDisable = "Pausing in {remaining}…" -guardEnable = "Starting in {remaining}…" +guard = "Starting in {remaining}…" minCharge = "Minimum charging to {soc}%." pvDisable = "Not enough surplus. Pausing in {remaining}…" pvEnable = "Surplus available. Starting in {remaining}…"