For some reason virtual custom devices remove trailing decimal zero's, even when I feed it with
Code: Select all
mysensor.updateCustomSensor(string.format("%.2f", myvalue))It does not matter whether myvalue is a number or a string.
Is this standard behavior from updateCustomSensor()?
I want the virtual custom device to represent a currency in visually pleasant way, f.e. "10.20" not "10.2".
Am I (absolute lua, Domoticz and dzVents beginner) doing something wrong?