Log minSoc and batteryPrioritySoc (#10282)
This commit is contained in:
parent
25f6e1311a
commit
d516e84c42
3 changed files with 5 additions and 1 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -768,6 +768,7 @@ func TestMinSoc(t *testing.T) {
|
|||
|
||||
for _, tc := range tc {
|
||||
lp := &Loadpoint{
|
||||
log: util.NewLogger("foo"),
|
||||
Soc: SocConfig{
|
||||
min: tc.min,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue