fix temperature decimals for the current weather

This commit is contained in:
mrbwburns 2024-01-24 22:18:23 +01:00
parent 4d97278bc5
commit 82ba16c83b

View File

@ -472,10 +472,8 @@ class Weather(inkycal_module):
logger.debug((key, val))
# Get some current weather details
if dec_temp != 0:
temperature = f"{round(current_weather['temp'])}°"
else:
temperature = f"{round(current_weather['temp'], ndigits=dec_temp)}°"
temperature = f"{current_weather['temp']:.{dec_temp}f}{self.tempDispUnit}"
weather_icon = current_weather["weather_icon_name"]
humidity = str(current_weather["humidity"])