Skip to content

Commit

Permalink
Wallbe: fix measurement decoding (evcc-io#2161)
Browse files Browse the repository at this point in the history
  • Loading branch information
premultiply authored Dec 30, 2021
1 parent e017ce0 commit 4f76421
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charger/wallbe.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ func (wb *Wallbe) currentPower() (float64, error) {
return 0, err
}

return rs485.RTUUint32ToFloat64Swapped(b), nil
return rs485.RTUInt32ToFloat64Swapped(b), nil
}

// totalEnergy implements the api.MeterEnergy interface
Expand Down Expand Up @@ -222,7 +222,7 @@ func (wb *Wallbe) currents() (float64, float64, float64, error) {
return 0, 0, 0, err
}

currents = append(currents, rs485.RTUUint32ToFloat64Swapped(b))
currents = append(currents, rs485.RTUInt32ToFloat64Swapped(b))
}

return currents[0], currents[1], currents[2], nil
Expand Down

0 comments on commit 4f76421

Please sign in to comment.