Loadpoint: log battery boost errors (#28403)
This commit is contained in:
parent
5877d0acd5
commit
cfec1b6af8
1 changed files with 6 additions and 5 deletions
|
|
@ -1877,12 +1877,13 @@ func (lp *Loadpoint) phaseSwitchCompleted() bool {
|
|||
func (lp *Loadpoint) Update(sitePower, batteryBoostPower float64, consumption, feedin api.Rates, batteryBuffered, batteryStart bool, greenShare float64, effPrice, effCo2 *float64) {
|
||||
// auto-disable battery boost when SOC drops below limit
|
||||
if lp.GetBatteryBoost() != boostDisabled {
|
||||
limit := lp.GetBatteryBoostLimit()
|
||||
if limit < 100 {
|
||||
batterySoc := lp.site.GetBatterySoc()
|
||||
if batterySoc < float64(limit) {
|
||||
if limit := lp.GetBatteryBoostLimit(); limit < 100 {
|
||||
if batterySoc := lp.site.GetBatterySoc(); batterySoc < float64(limit) {
|
||||
lp.log.DEBUG.Printf("battery boost disabled: soc below limit (%.0f%% < %d%%)", batterySoc, limit)
|
||||
_ = lp.SetBatteryBoost(false)
|
||||
|
||||
if err := lp.SetBatteryBoost(false); err != nil {
|
||||
lp.log.ERROR.Printf("set battery boost: %v", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue