as the Title says I have one of the Home assistant gauges that goes out past the decimal point alot further than I want how do I get it to round to one decibel from the decimal like the other 2 without having to use custom guages thanks
Maybe by creating State-based Template Sensor and using it for your gauge?
template:
- sensor:
- name: "Shower Temperature"
unit_of_measurement: "°F"
state: >-
{{ '%.1f' | format(states('sensor.shower_temperature') | float ) }}
Replace sensor.shower_temperature
with your entity_id
for Shower Temperature.
Okay thanks was hoping for a more direct but I can do this as well thank you
okay this is working except for it only showing whole numbers what do I need to change get it to show one digit readings past the decimal for example 105.8 instead of it rounding up to 106.0 ?
- platform: template
sensors:
main_shower_temp:
unit_of_measurement: "°F"
value_template:
{{ '%.1f' | format(states('sensor.u_by_moen_00651a_current_temperature') | float ) }}
friendly_name: "Main Shower Temperature"
The format
statement, with %.1f
, rounds to one decimal place. If you’re seeing numbers rounded to integers then something else is responsible.
Click on the gauge you want to change which by default opens up a history graph. Clcik on the “settings” icon in the top right corner of this. Use the display precision drop down to choose how many decimal places you want to display.