Prioritizer: no flexibility for switch devices in MinPV (#30194)

This commit is contained in:
andig 2026-05-26 18:30:10 +02:00 • committed by GitHub
parent c00c21aa04
commit dcc8ed6f7e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -662,7 +662,11 @@ func (lp *Loadpoint) GetChargePowerFlexibility(rates api.Rates) float64 {
return lp.GetChargePower()
}
// MinPV mode
// MinPV mode: a charger without current control (switch socket or heatpump) cannot release power.
if lp.chargerHasFeature(api.SwitchDevice) || lp.chargerHasFeature(api.Continuous) {
return 0
}
return max(0, lp.GetChargePower()-lp.EffectiveMinPower())
}