domoticz-modbus
domoticz-modbus copied to clipboard
Update plugin.py
Lines 493, 494 and 495 had an error in the scaling applied for multiplication.
They were: if (self.Domoticz_Setting_Scale_Factor == "mul100"): value = str(value * 100, 2) if (self.Domoticz_Setting_Scale_Factor == "mul1000"): value = str(value * 1000, 3) if (self.Domoticz_Setting_Scale_Factor == "mul10000"): value = str(value * 10000, 4)
And should be as follows for scaling to work correctly. if (self.Domoticz_Setting_Scale_Factor == "mul100"): value = str(value * 100) if (self.Domoticz_Setting_Scale_Factor == "mul1000"): value = str(value * 1000) if (self.Domoticz_Setting_Scale_Factor == "mul10000"): value = str(value * 10000)