Rounding of temperature values

Hi, one of my devices show the temperature and humidity with a lot of decimal how can round to only 2 decimals in the following code?

custom_fields:
temp: >
[[[ return
states[‘sensor.ble_temperature_govee_termometro_higrometro’].state +
‘°C’ +’ | '+
states[‘sensor.ble_humidity_govee_termometro_higrometro’].state +
‘%’]]]

Thanks in advance

I had the same sort of questions and found my answer here:
https://community.home-assistant.io/t/custom-button-card-with-rounded-temp-values/291614
I hope the answers petro gave there will help you as well

1 Like