diff --git a/modules/weather.py b/modules/weather.py index 628b27a..f241fe8 100644 --- a/modules/weather.py +++ b/modules/weather.py @@ -274,6 +274,7 @@ class WeatherAlertsModule: def draw_module(self, config, width, height): image = Image.new('RGBA', (width, height), "#000") draw = ImageDraw.Draw(image) + align = 0 if WeatherAPI().has_alerts(): alerts = WeatherAPI().get_alerts() @@ -281,9 +282,9 @@ class WeatherAlertsModule: fnt_R = ImageFont.truetype(config.fnt_R_path, 16) fnt_B = ImageFont.truetype(config.fnt_RB_path, 16) - align = 7 + align = 10 for alert in alerts: - if alert["severity"] == "watch": + if alert["severity"] == "watch" or alert["title"].startswith("Moderate"): icon = "wi-small-craft-advisory.png" elif alert["severity"] == "warning": icon = "wi-gale-warning.png" @@ -328,6 +329,6 @@ class WeatherAlertsModule: font=fnt_R )[1] - image = image.crop((0,0,width, align)) + image = image.crop((0,0,width, align)) return image