Fix smart cost zero status (#16064)

This commit is contained in:
Michael Geers 2024-09-13 13:39:40 +02:00 • committed by GitHub
parent ef6ad884c6
commit ad9edb84eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 7 additions and 7 deletions

View file

@ -272,7 +272,7 @@ export default {
bufferStartSoc: Number,
batteryDischargeControl: Boolean,
battery: { type: Array, default: () => [] },
batteryGridChargeLimit: Number,
batteryGridChargeLimit: { type: Number, default: null },
smartCostType: String,
tariffGrid: Number,
currency: String,

View file

@ -109,7 +109,7 @@ export default {
return this.fmtWh(this.planEnergy * 1e3);
},
costLimitExists: function () {
return this.smartCostLimit !== 0;
return this.smartCostLimit !== null;
},
costLimitText: function () {
if (this.isCo2) {

View file

@ -337,7 +337,7 @@ export default {
return this.fmtPricePerKWh(this.tariffGrid, this.currency, true);
},
batteryGridChargeLimitFmt() {
if (this.batteryGridChargeLimit === null || this.batteryGridChargeLimit === undefined) {
if (this.batteryGridChargeLimit === null) {
return;
}
if (this.co2Available) {

View file

@ -192,7 +192,7 @@ export default {
phaseRemaining: Number,
pvRemaining: Number,
pvAction: String,
smartCostLimit: { type: Number, default: 0 },
smartCostLimit: { type: Number, default: null },
smartCostType: String,
smartCostActive: Boolean,
smartCostNextStart: String,

View file

@ -72,7 +72,7 @@ export default {
batteryPower: Number,
batterySoc: Number,
batteryDischargeControl: Boolean,
batteryGridChargeLimit: Number,
batteryGridChargeLimit: { type: Number, default: null },
batteryGridChargeActive: Boolean,
batteryMode: String,
battery: Array,

View file

@ -214,7 +214,7 @@ export default {
pvRemainingInterpolated: Number,
smartCostActive: Boolean,
smartCostDisabled: Boolean,
smartCostLimit: Number,
smartCostLimit: { type: Number, default: null },
smartCostNextStart: String,
smartCostType: String,
tariffCo2: Number,
@ -422,7 +422,7 @@ export default {
});
},
smartCostVisible() {
return !!this.smartCostLimit;
return this.smartCostLimit !== null;
},
smartCostTooltipContent() {
if (!this.smartCostVisible) {