From 82ba16c83b146ebd66b2d9668add255f712a2d74 Mon Sep 17 00:00:00 2001 From: mrbwburns <> Date: Wed, 24 Jan 2024 22:18:23 +0100 Subject: [PATCH] fix temperature decimals for the current weather --- inkycal/modules/inkycal_weather.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/inkycal/modules/inkycal_weather.py b/inkycal/modules/inkycal_weather.py index 992030e..7be5e17 100644 --- a/inkycal/modules/inkycal_weather.py +++ b/inkycal/modules/inkycal_weather.py @@ -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"])