Rounding Temperature Differences in Smart Home Setup

Hello everyone, I’m currently working on a project where I need to calculate and display temperature differences in my smart home setup. I’ve managed to get the temperatures from different sensors, but the results are coming out with decimal values like 1.85 or 1.95. I would really appreciate it if I could round these numbers to one decimal place, such as 1.80 or 1.90.

I’ve tried several approaches, but none seem to work. Here’s a snippet of the code I’m using:

javascript
real thermokue = dom.GetObject(“BidCos-RF.OEQ1234567:2.ACTUAL_TEMPERATURE”).Value();
real thermowz = dom.GetObject(“BidCos-RF.OEQ7654321:2.ACTUAL_TEMPERATURE”).Value();
real thermoaussen = dom.GetObject(“BidCos-RF.OEQ6352735:1.TEMPERATURE”).Value();
dom.GetObject(“W_Temperatur_Differenz”).State(thermoaussen - (thermokue + thermowz) / 2);

I’m wondering if there’s a straightforward way to round these real numbers. I’ve heard about rounding functions, but I’m not sure how to implement them correctly in this context. Any advice or suggestions would be greatly appreciated! Thanks in advance for your help. :blush: