Wallbe: fix measurement decoding (#2161)

This commit is contained in:
premultiply 2021-12-30 21:50:14 +01:00 • committed by GitHub
parent e017ce0586
commit 4f7642184e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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