Skip to content

Commit

Permalink
Fix broken plan view for disconnected soc vehicles (evcc-io#11603)
Browse files Browse the repository at this point in the history
  • Loading branch information
naltatis committed Jan 10, 2024
1 parent c9228cf commit 00b2a32
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion assets/js/components/Loadpoint.vue
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,19 @@ export default {
socBasedCharging: function () {
return (!this.vehicleFeatureOffline && this.vehiclePresent) || this.vehicleSoc > 0;
},
knownVehicle: function () {
return !!this.vehicleName;
},
vehicleHasSoc: function () {
return this.knownVehicle && !this.vehicleFeatureOffline;
},
socBasedPlanning: function () {
return this.vehicleSoc > 0 && this.vehicleCapacity > 0;
// TODO: deduplicate business logic. see also: socBasedPlanning() in loadpoint.go
return (
this.knownVehicle &&
this.vehicleCapacity > 0 &&
(this.vehicleHasSoc || this.vehicleSoc > 0)
);
},
},
watch: {
Expand Down

0 comments on commit 00b2a32

Please sign in to comment.