effectiveMaxPower returns the effective max power taking vehicle capabilities and phase scaling into account
()
| 241 | |
| 242 | // effectiveMaxPower returns the effective max power taking vehicle capabilities and phase scaling into account |
| 243 | func (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 |
| 254 | func (lp *Loadpoint) EffectivePlanStrategy() api.PlanStrategy { |
no test coverage detected