File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import (
1818 "github.com/evcc-io/evcc/core/loadpoint"
1919 "github.com/evcc-io/evcc/core/metrics"
2020 "github.com/evcc-io/evcc/core/types"
21+ "github.com/evcc-io/evcc/hems/hems"
2122 "github.com/evcc-io/evcc/tariff"
2223 "github.com/evcc-io/evcc/util/config"
2324 "github.com/evcc-io/evcc/util/request"
@@ -332,9 +333,9 @@ func (site *Site) optimizerUpdate(battery []types.Measurement) error {
332333
333334 // soft grid feed-in cap from active HEMS curtailment (e.g. German 70% rule):
334335 // export is capped at this power, excess PV is curtailed instead of exported
335- if site .hems != nil {
336- if p := site .hems .MaxProductionPower (); p != nil && * p > 0 {
337- req .Grid .PMaxExp = float32 (* p )
336+ if curtailed := hems . Curtailed ( site .hems ); curtailed != nil && * curtailed {
337+ if pMaxExp := site .hems .MaxProductionPower (); pMaxExp != nil {
338+ req .Grid .PMaxExp = float32 (* pMaxExp )
338339 }
339340 }
340341
You can’t perform that action at this time.
0 commit comments