Kathrein: remove incorrect charge duration (#25934)

This commit is contained in:
Dodi1968 2025-12-09 21:48:11 +01:00 • committed by GitHub
parent 2f164cd294
commit d92ee4f157
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -24,7 +24,6 @@ import (
"fmt"
"math"
"strings"
"time"
"github.com/evcc-io/evcc/api"
"github.com/evcc-io/evcc/util"
@ -309,17 +308,8 @@ func (wb *Kathrein) Voltages() (float64, float64, float64, error) {
return wb.getPhaseValues(kathreinRegVoltages, 1)
}
var _ api.ChargeTimer = (*Kathrein)(nil)
// ChargeDuration implements the api.ChargeTimer interface
func (wb *Kathrein) ChargeDuration() (time.Duration, error) {
b, err := wb.conn.ReadHoldingRegisters(kathreinRegChargingDuration, 2)
if err != nil {
return 0, err
}
return time.Duration(binary.BigEndian.Uint32(b)) * time.Second, nil
}
// removed since broken, see https://github.com/evcc-io/evcc/pull/25934
// var _ api.ChargeTimer = (*Kathrein)(nil)
// removed since broken, see https://github.com/evcc-io/evcc/pull/25427
// var _ api.ChargeRater = (*Kathrein)(nil)