Add climating status to UI (#7221)

This commit is contained in:
Michael Geers 2023-04-09 11:22:17 +02:00 • committed by GitHub
parent 8721ab0529
commit 0d9835d010
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 24 additions and 1 deletions

View file

@ -179,7 +179,6 @@ export default {
// details
chargePower: Number,
chargedEnergy: Number,
// chargeDuration: Number,
climaterActive: Boolean,
chargeRemainingDuration: Number,

View file

@ -113,6 +113,7 @@ export default {
guardAction: String,
guardRemainingInterpolated: Number,
vehicles: Array,
climaterActive: Boolean,
smartCostLimit: Number,
smartCostUnit: String,
tariffGrid: Number,

View file

@ -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(

View file

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

View file

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

View file

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