Average Sensor: Precision not being regarded

Hi all,
I’m struggeling to figure out why my average sensor is being displayed with a precision / decimal number although I defined the precision to be 0.

My config from my configuration.yaml looks like this:

  • platform: average
    name: ‘1 min Erzeugung’
    duration: 00:01:00
    precision:
    0
    entities:
    • sensor.sn_3009008128_grid_power

Using this entity on my Dashboard it is being presented with one decimal place.
Of course I can’t change this in the UI as I defined it in the configuration.yaml.

This entity (‘sensor.1 min Erzeugung’) does not have a unique ID, therefore its settings cannot be managed from the UI. See the documentation for more detail.

I can however change the precision to a greater value e.g. 3 which then is displayed correctly on my dashboard.

Any idea of how to deal with this?

Just put the 0 on the same line:

- platform: average
  name: ‘1 min Erzeugung’
  duration: 00:01:00
  precision: 0
  entities:
  - sensor.sn_3009008128_grid_power

In this way you should solve.