I’ve built a sensor that calculates costs for energy consumption. It rounds to two decimals. But if there’s only one decimal, it shows one decimal. Normally that’s fine. Yet, as the sensor calculates an amount of money in euro’s, I actually want the sensor to always show two decimals.
Sorry to revive an old thread but I’m looking to format a number to currency the European way. That means a dot as thousand seperator and a comma for decimals. Then this also be done using format()?