Help with templating (working in dev tools but not in config)

Hi,

I have a mqtt sensor that show the noise coming from a babymonitor:

mqtt:
  sensor:
    - name: "Decibel Cameretta"
      state_topic: "frigate/cameretta/audio/dBFS"

The sensor is full of useless decimals = -54.64885545

So I want to make it more readable using templating.
The “fun” thing is that it works in dev tools but not in “production”

This is what is I wrote:

value_template: '{{ states("sensor.decibel_cameretta") | round(0, default) }}'

Any hint?

Thanks!

mqtt:
  sensor:
    - name: "Decibel Cameretta"
      state_topic: "frigate/cameretta/audio/dBFS"
      value_template: "{{ value | round(0) }}"

thanks. It makes me feel stupid