Format template value as separator (comma) to thousands

I have a sensor that shows in bps I try to fix it to read in kB/s and add thousands separator (comma)

as this template

  - sensor:
      - name: "DELL kB/s_received"
        unique_id: dell_network_kbs_received
        icon: mdi:download
        unit_of_measurement: "kB/s"
        state: >
          {{ "{0:,.0f}".format(states.sensor.dell_network_0_bps_received.state | float / (1024)) }}
          

Problem is it change to many result types as shown bellow



for that the gauge card give me this error when ( Result type: list )

this when it ( Result type: number or string )

any suggestion ?
Thanks

If you add commas to the sensor state, it’s no longer a number. As you noted, the template variously interpreted it as a list of numbers (when both sides of the comma were numeric); a number when below 1,000; and a string when there was a leading zero to the right of the comma.

You need to set your system to show commas as the general number format. See under Profile / Number Format:

image

My Auto setting uses commas already, and if I set up a gauge card with a suitably-large sensor:

image

Thank you dear its work for me