From 4acc6f50d31dbecd3371dda7a161a1382ca15952 Mon Sep 17 00:00:00 2001 From: andig Date: Tue, 15 Oct 2024 18:21:55 +0200 Subject: [PATCH] chore: simplify --- core/site.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/core/site.go b/core/site.go index 467afe03f..fdee2f00e 100644 --- a/core/site.go +++ b/core/site.go @@ -29,7 +29,6 @@ import ( "github.com/evcc-io/evcc/util" "github.com/evcc-io/evcc/util/config" "github.com/evcc-io/evcc/util/telemetry" - "github.com/samber/lo" "github.com/smallnest/chanx" "golang.org/x/sync/errgroup" ) @@ -671,10 +670,7 @@ func (site *Site) updateBatteryMeters() error { site.publish(keys.BatterySoc, site.batterySoc) var excessStr string - if lo.ContainsBy(site.batteryMeters, func(m api.Meter) bool { - _, ok := m.(api.BatteryMaxACPower) - return ok - }) { + if site.batteryExcessDC > 0 { excessStr = fmt.Sprintf(" (includes %.0fW excess DC)", site.batteryExcessDC) }