diff --git a/core/loadpoint.go b/core/loadpoint.go index 8f39c3b6c..930f7add5 100644 --- a/core/loadpoint.go +++ b/core/loadpoint.go @@ -825,6 +825,9 @@ func (lp *Loadpoint) minSocNotReached() bool { } if lp.vehicleSoc != 0 { + if lp.vehicleSoc < float64(lp.Soc.min) { + lp.log.DEBUG.Printf("forced charging at vehicle soc %.0f%% (< %.0f%% min soc)", lp.vehicleSoc, float64(lp.Soc.min)) + } return lp.vehicleSoc < float64(lp.Soc.min) } diff --git a/core/loadpoint_test.go b/core/loadpoint_test.go index bb9774368..5e8d23d5a 100644 --- a/core/loadpoint_test.go +++ b/core/loadpoint_test.go @@ -768,6 +768,7 @@ func TestMinSoc(t *testing.T) { for _, tc := range tc { lp := &Loadpoint{ + log: util.NewLogger("foo"), Soc: SocConfig{ min: tc.min, }, diff --git a/core/site.go b/core/site.go index f59f73493..a4c9c2267 100644 --- a/core/site.go +++ b/core/site.go @@ -613,7 +613,7 @@ func (site *Site) sitePower(totalChargePower, flexiblePower float64) (float64, b // if battery is charging below prioritySoc give it priority if site.batterySoc < site.PrioritySoc && batteryPower < 0 { - site.log.DEBUG.Printf("giving priority to battery charging at soc: %.0f%%", site.batterySoc) + site.log.DEBUG.Printf("battery has priority at soc %.0f%% (< %.0f%%)", site.batterySoc, site.PrioritySoc) batteryPower = 0 } else { // if battery is above bufferSoc allow using it for charging