Optimizer: fix goal for non-socBased vehicles (#25096)

Co-authored-by: andig <cpuidle@gmail.com>
This commit is contained in:
RenatusRo 2025-11-07 08:36:34 +01:00 • committed by GitHub
parent 7b3ecb0172
commit 2901d0887c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -210,6 +210,8 @@ func (site *Site) optimizerUpdate(battery []measurement) error {
if goal > 0 {
if v := lp.GetVehicle(); socBased && v != nil {
goal *= v.Capacity() * 10
} else {
goal *= 1000 // Wh
}
}