From 4f7642184e86dfa8f9d2f390d8aa4f14a3206edb Mon Sep 17 00:00:00 2001 From: premultiply Date: Thu, 30 Dec 2021 21:50:14 +0100 Subject: [PATCH] Wallbe: fix measurement decoding (#2161) --- charger/wallbe.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charger/wallbe.go b/charger/wallbe.go index 6beb33030..a1a1a31b2 100644 --- a/charger/wallbe.go +++ b/charger/wallbe.go @@ -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 @@ -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