Fix broken plan view for disconnected soc vehicles (#11603)
This commit is contained in:
parent
c9228cf3a4
commit
00b2a327d6
1 changed files with 12 additions and 1 deletions
|
|
@ -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: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue