MCPcopy Create free account
hub / github.com/evcc-io/evcc / effectiveMaxCurrent

Method effectiveMaxCurrent

core/loadpoint_effective.go:175–191  ·  view source on GitHub ↗

effectiveMaxCurrent returns the effective max current

()

Source from the content-addressed store, hash-verified

173
174// effectiveMaxCurrent returns the effective max current
175func (lp *Loadpoint) effectiveMaxCurrent() float64 {
176 maxCurrent := lp.getMaxCurrent()
177
178 if v := lp.GetVehicle(); v != nil {
179 if res, ok := v.OnIdentified().GetMaxCurrent(); ok && res > 0 {
180 maxCurrent = min(maxCurrent, res)
181 }
182 }
183
184 if c, ok := api.Cap[api.CurrentLimiter](lp.charger); ok {
185 if _, res, err := c.GetMinMaxCurrent(); err == nil && res > 0 {
186 maxCurrent = min(maxCurrent, res)
187 }
188 }
189
190 return maxCurrent
191}
192
193// EffectiveLimitSoc returns the effective session limit soc
194func (lp *Loadpoint) EffectiveLimitSoc() int {

Callers 6

setLimitMethod · 0.95
fastChargingMethod · 0.95
pvMaxCurrentMethod · 0.95
effectiveMaxPowerMethod · 0.95

Calls 5

getMaxCurrentMethod · 0.95
GetVehicleMethod · 0.95
GetMaxCurrentMethod · 0.65
OnIdentifiedMethod · 0.65
GetMinMaxCurrentMethod · 0.65

Tested by 1