chore: fix error return

This commit is contained in:
andig 2026-06-18 12:20:50 +02:00
parent 7ac3af86c2
commit 0c9afa1ace

View file

@ -145,7 +145,7 @@ func (cr *ChargeRater) ChargedEnergy() (float64, error) {
if m, ok := api.Cap[api.MeterEnergy](cr.meter); ok {
f, err := m.TotalEnergy()
if err != nil {
return 0, fmt.Errorf("charge total import: %v", err)
return 0, fmt.Errorf("charge total import: %w", err)
}
// late-latch baseline if StartCharge could not read TotalEnergy