summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2022-06-19 19:18:14 +0200
committerlassulus <lassulus@lassul.us>2022-06-19 19:18:14 +0200
commitb887b8e277705f8a8a84d91bd61f9be37f54840f (patch)
tree80593a2d7e35dc842ec957d93564ff2c84062038
parent342cb369bb6a78dbb6e2f03d7ea8873b1a3d32ab (diff)
l radio weather_report: less precision for floats
-rw-r--r--lass/2configs/radio/weather_for_ips.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lass/2configs/radio/weather_for_ips.py b/lass/2configs/radio/weather_for_ips.py
index f7cc2dace..587cc1f28 100644
--- a/lass/2configs/radio/weather_for_ips.py
+++ b/lass/2configs/radio/weather_for_ips.py
@@ -25,9 +25,9 @@ for ip in fileinput.input():
output.append(
f'Weather report for {location.city.name}, {location.country.name}. '
f'Currently it is {weather["current"]["weather"][0]["description"]} outside '
- f'with a temperature of {weather["current"]["temp"]} degrees, '
- f'and a wind speed of {weather["current"]["wind_speed"]} meters per second. '
- f'The probability of precipitation is {weather["hourly"][0]["pop"] * 100} percent. '
+ f'with a temperature of {weather["current"]["temp"]:.1f} degrees, '
+ f'and a wind speed of {weather["current"]["wind_speed"]:.1f} meters per second. '
+ f'The probability of precipitation is {weather["hourly"][0]["pop"] * 100:.0f} percent. '
)
print('\n'.join(output))