This reverts commit dc11797e49.
This commit is contained in:
parent
6699cca025
commit
4e47b11d1b
4 changed files with 8 additions and 42 deletions
|
|
@ -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", () => {
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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}…"
|
||||
|
|
|
|||
|
|
@ -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}…"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue