Revert "Add guard disable timer to status ui (#7959)" (#8041)

This reverts commit dc11797e49.
This commit is contained in:
Michael Geers 2023-05-17 08:49:38 +02:00 • committed by GitHub
parent 6699cca025
commit 4e47b11d1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 42 deletions

View file

@ -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", () => {

View file

@ -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),
});
}

View file

@ -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}…"

View file

@ -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}…"