diff --git a/control/control.go b/control/control.go index a72a55a..817973f 100644 --- a/control/control.go +++ b/control/control.go @@ -138,7 +138,7 @@ func (c *Control) Start() { metrics.SetMetricValue("control", "action", map[string]string{"action": "charge_batteries"}, 1) // charge batteries with 20% less than over production - batteryChargeWatts := uint(math.Floor(float64(overProductionWatts) * 0.80)) + batteryChargeWatts := uint(math.Floor(float64(overProductionWatts) * 0.90)) / uint(len(batteries)) for _, battery := range batteries { if battery.capacity < 100 {