Decimal Rounding

Some of my values either from the battery level or Fitbit tracker have very long set of decimals. Is there a way to round the values?

An easy way would be to use a template sensor with some templating and hide the actual sensor.

Wouldn’t this push the template sensor values in the history, meaning that i,e influx (or whatever history db one uses) would contain both the original, unrounded value, and the new rounded value?