Remove temperature gauge decimal places

I’m quite new to Home assistant, so this may be a relatively easy questions.

How do I remove the to decimal places from the end of the temperature gauge I have on the overview page?

Screenshot%20from%202019-08-25%2018-15-07

I would like it to just display 74 F

I am using a Hue motion sensor (sensor.entry_motion_sensor_temperature)

Thanks!

Ideally you configure the sensor to only report whole numbers. Alternatively you build a template sensor to create the value you want:

sensor:
  - platform: template
    sensors:
      entry_temperature:
        friendly_name: "Entry temperature"
        unit_of_measurement: '°C'
        value_template: "{{ states('sensor.entry_motion_sensor_temperature')|int }}"
1 Like

Seems to me the sensor should report 75 if the usual rounding algorithm (the one I learned at school) is applied…

That would use round instead of int, so

value_template: "{{ states('sensor.entry_motion_sensor_temperature')|round }}"
1 Like

I use a template sensor with both round and int - this works so yours will look like,

value_template: "{{ states('sensor.entry_motion_sensor_temperature') | round|int }}"

Simon

1 Like

Thanks everyone! it worked great!

Took me a while to realize that I had to select the new entity, but finally figured that out.

Sorry to bring back an old thread, but how would you go about specifying the number of decimal places to display?
I have a temperature sensor showing -1.500000C and I only want it to show -1.5C
I’d like the top reading to display similar to the bottom reading.

Some problem here. I have a Gauge showing the Solar Power.
I want to show no decimals. There is (very strang) no option to set the number of decimals in the Gauge card. How do I set the number og decimals. I search the forum and found something about templates but do not know how to start.

Please help.

Try setting display precision

Hi Nickrout,

I do not have these settings :slight_smile:

Hard to tell. I don’t read that language, and this is an English language forum.

Besides, a closer look reveals you are looking in the wrong place. That looks like a dashboard setting. Look at the device settings.

OMG, So easy. Thank you so much Nickrout for your help. This did the job.