Add climating status to UI (#7221)
This commit is contained in:
parent
8721ab0529
commit
0d9835d010
6 changed files with 24 additions and 1 deletions
|
|
@ -179,7 +179,6 @@ export default {
|
|||
// details
|
||||
chargePower: Number,
|
||||
chargedEnergy: Number,
|
||||
// chargeDuration: Number,
|
||||
climaterActive: Boolean,
|
||||
chargeRemainingDuration: Number,
|
||||
|
||||
|
|
|
|||
|
|
@ -113,6 +113,7 @@ export default {
|
|||
guardAction: String,
|
||||
guardRemainingInterpolated: Number,
|
||||
vehicles: Array,
|
||||
climaterActive: Boolean,
|
||||
smartCostLimit: Number,
|
||||
smartCostUnit: String,
|
||||
tariffGrid: Number,
|
||||
|
|
|
|||
|
|
@ -57,6 +57,22 @@ describe("target charge", () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe("climating", () => {
|
||||
test("show climating status", () => {
|
||||
expectStatus(
|
||||
{ connected: true, enabled: true, climaterActive: true, charging: true },
|
||||
"climating"
|
||||
);
|
||||
expectStatus(
|
||||
{ connected: true, enabled: true, climaterActive: true, charging: false },
|
||||
"climating"
|
||||
);
|
||||
});
|
||||
test("only show climating if enabled", () => {
|
||||
expectStatus({ connected: true, enabled: false, climaterActive: true }, "connected");
|
||||
});
|
||||
});
|
||||
|
||||
describe("timer", () => {
|
||||
test("show pv enable timer if not enabled yet and timer exists", () => {
|
||||
expectStatus(
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ export default {
|
|||
guardAction: String,
|
||||
guardRemainingInterpolated: Number,
|
||||
targetChargeDisabled: Boolean,
|
||||
climaterActive: Boolean,
|
||||
smartCostLimit: Number,
|
||||
smartCostUnit: String,
|
||||
tariffGrid: Number,
|
||||
|
|
@ -92,6 +93,10 @@ export default {
|
|||
});
|
||||
}
|
||||
|
||||
if (this.enabled && this.climaterActive) {
|
||||
return t("climating");
|
||||
}
|
||||
|
||||
if (this.enabled && !this.charging) {
|
||||
if (this.vehicleTargetSoc > 0 && this.vehicleSoc >= this.vehicleTargetSoc - 1) {
|
||||
return t("vehicleTargetReached", { soc: this.vehicleTargetSoc });
|
||||
|
|
|
|||
|
|
@ -200,6 +200,7 @@ vehicleTarget = "Fahrzeuglimit: {soc}%"
|
|||
charging = "Ladevorgang aktiv…"
|
||||
cheapEnergyCharging = "Günstige Energie verfügbar. Ladevorgang aktiv…"
|
||||
cleanEnergyCharging = "Saubere Energie verfügbar. Ladevorgang aktiv…"
|
||||
climating = "Vorklimatisierung erkannt."
|
||||
connected = "Verbunden."
|
||||
disconnected = "Nicht verbunden."
|
||||
guard = "Starte in {remaining}…"
|
||||
|
|
|
|||
|
|
@ -200,6 +200,7 @@ vehicleTarget = "Vehicle limit: {soc}%"
|
|||
charging = "Charging…"
|
||||
cheapEnergyCharging = "Cheap energy available. Charging…"
|
||||
cleanEnergyCharging = "Clean energy available. Charging…"
|
||||
climating = "Pre-conditioning detected."
|
||||
connected = "Connected."
|
||||
disconnected = "Disconnected."
|
||||
guard = "Starting in {remaining}…"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue