From c9b94560ed249be6fbc87a9aa10803ecaa03b025 Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Thu, 2 Nov 2023 09:26:46 +0100 Subject: [PATCH] Change wind scale --- modules/weather.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/weather.py b/modules/weather.py index 2383349..45f9f06 100644 --- a/modules/weather.py +++ b/modules/weather.py @@ -215,11 +215,14 @@ class WeatherRainModule: icon_path = "wi-snowflake-cold.png" elif thisdayweather["daily_chance_of_rain"] > 0: gauge.add('Pluie', [{'value': thisdayweather["daily_chance_of_rain"] + 1}]) - icon_path = "wi-umbrella.png" + if thisdayweather["gust_kph"] > 45: + icon_path = "wi-wind-beaufort-6.png" + else: + icon_path = "wi-umbrella.png" elif thisdayweather["uv"] > 4: gauge.add('Index UV', [{'value': thisdayweather["uv"] * 10}]) icon_path = "wi-hot.png" - elif thisdayweather["maxwind_kph"] > 50: + elif thisdayweather["maxwind_kph"] > 40: gauge.add('Vent', [{'value': thisdayweather["maxwind_kph"], 'color': '#999'}]) icon_path = "wi-strong-wind.png" elif thisdayweather["avgvis_km"] < 10: