Loadpoint: don't validate currents for heating devices with external meter (#24564)

This commit is contained in:
andig 2025-10-19 12:55:24 +02:00 • committed by GitHub
parent 4201e8fa88
commit b8a614ef0a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View file

@ -781,7 +781,7 @@ func (lp *Loadpoint) syncCharger() error {
if !isCg || errors.Is(err, api.ErrNotAvailable) {
// validate if current too high by more than 1A (https://github.com/evcc-io/evcc/issues/14731)
if current := lp.GetMaxPhaseCurrent(); current > lp.offeredCurrent+1.0 {
if shouldBeConsistent {
if shouldBeConsistent && !lp.chargerHasFeature(api.Heating) {
lp.log.WARN.Printf("charger logic error: current mismatch (got %.3gA measured, expected %.3gA) - make sure your interval is at least 30s", current, lp.offeredCurrent)
}
lp.offeredCurrent = current

View file

@ -607,7 +607,8 @@ func (lp *Loadpoint) GetChargePowerFlexibility(rates api.Rates) float64 {
return max(0, lp.GetChargePower()-lp.EffectiveMinPower())
}
// GetMaxPhaseCurrent returns the current charge power
// GetMaxPhaseCurrent returns the maximum charge current per phase or- if not available-
// the offered current from either charger or charge meter
func (lp *Loadpoint) GetMaxPhaseCurrent() float64 {
lp.RLock()
defer lp.RUnlock()