Skip to content

Commit

Permalink
Fix smart cost zero status (#16064)
Browse files Browse the repository at this point in the history
  • Loading branch information
naltatis authored Sep 13, 2024
1 parent ef6ad88 commit ad9edb8
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion assets/js/components/BatterySettingsModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion assets/js/components/ChargingPlanWarnings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion assets/js/components/Energyflow/Energyflow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion assets/js/components/Loadpoint.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion assets/js/components/Site.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions assets/js/components/VehicleStatus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -422,7 +422,7 @@ export default {
});
},
smartCostVisible() {
return !!this.smartCostLimit;
return this.smartCostLimit !== null;
},
smartCostTooltipContent() {
if (!this.smartCostVisible) {
Expand Down

0 comments on commit ad9edb8

Please sign in to comment.