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

Method effectiveMaxPower

core/loadpoint_effective.go:243–251  ·  view source on GitHub ↗

effectiveMaxPower returns the effective max power taking vehicle capabilities and phase scaling into account

()

Source from the content-addressed store, hash-verified

241
242// effectiveMaxPower returns the effective max power taking vehicle capabilities and phase scaling into account
243func (lp *Loadpoint) effectiveMaxPower() float64 {
244 res := Voltage * lp.effectiveMaxCurrent() * float64(lp.maxActivePhases())
245 if lp.vehicle != nil {
246 if maxPower, ok := lp.vehicle.OnIdentified().GetMaxPower(); ok {
247 return min(maxPower, res)
248 }
249 }
250 return res
251}
252
253// EffectivePlanStrategy returns the effective plan strategy
254func (lp *Loadpoint) EffectivePlanStrategy() api.PlanStrategy {

Callers 2

nextVehiclePlanMethod · 0.95
EffectiveMaxPowerMethod · 0.95

Calls 4

effectiveMaxCurrentMethod · 0.95
maxActivePhasesMethod · 0.95
GetMaxPowerMethod · 0.65
OnIdentifiedMethod · 0.65

Tested by

no test coverage detected