I’m slowly transitioning to OpenHab3 and become more and more happy with the result. Still some small things to improve on my application remain. One of them is this:
I try to use the graphical interfaces to configure as much as possible. Until now without any problem. I Have a smart energy meter, so I retreive the measured values for Electrical power from there. Periodically (every hour) I calculate the used energy by substracting the previous value from the current value KWh’s and store the result as periodical consumption. Works very fine. I can see the values moving and have a fantastic option to analyse why our consumption of power becomes high on a certain time of the day (funny to see how much energy is in children and see that this energy seems to be coming from the electricity system)
I want to show the calculated value on Page by means of a cell. Also that works fine, but is showing the value with too much detail (too may decimals). This is because the calculation creates these detailed values. So what should show als 0.084 is shown as 0.0839999999892316 (or something similar).
What is the quick and easy way to show the more readable (and acurate) value in the cell?
when you open the item (settings -> items) you will find a button “add Metadata”. There, choose state description and you can enter a custom format such as: %.2f kWh (this will give for example 0.08 kWh)
Thanks Bob, the easy and right answer.