The changed Modbus value from Item āMB_I_Reg_01ā is divded by 10 and passed via sendCommand to final item āHzgAussenTempā which has following config
To elaborate on Gregās reply, you donāt want to actually remove or truncate the actual value. When you do that all sorts of rounding errors build up to the point you end up with wrong values.
Instead, you want to round/truncate the value only when itās shown to a human. Thatās what Gregās answer does. It rounds the value to one decimal place before showing the value to the human on the display.
To elaborate on Gregās reply, you donāt want to actually remove or truncate the actual value. When you do that all sorts of rounding errors build up to the point you end up with wrong values.
This may not be the right aproach.
I have a device which I can ask every 30 seconds for values. This device is giving me the raw meassured value for example the outside temperature (12.06467 ) with 5(!) digits.
So every 30s I will have a fully changed temperature written to my influxdb. This will consume a lot of space on my disk.
So I really would prefer to round the measured value to 1 digit, then have the check if the value has changed to the last one and if so, then written to the database.
This is what I tried to do with this āstate formatterā, but when I enter it, then there is no value written at all. Also there is no log entry complaining anaything.
I suppose I have something wrong in the syntax or my understanding.
Your hint to do it with an transformation may solve the problem, but I have no clue where to enter that transformation. In the item definition I do not see a possibility
I said to add it to the Modbus data Thing.
The binding docs give an example of a ādivideā JS.
Donāt forget transformation services like JS or REGEX are add-ons needing tobe installed.