From da104268ab6c3c760f1bf8fe2ccf2345c2ef10a0 Mon Sep 17 00:00:00 2001 From: Erik Johnson Date: Mon, 2 May 2016 21:47:07 -0500 Subject: [PATCH] Catch another odd weather.com weather condition This properly colorizes when there is a thunderstorm and the weather.com API response defines the current weather condition as "T-Storm". No idea why they decide to do this, it's definitely not for brevity as they have a "Thunderstorms in the Vicinity" weather condition as well. Just a weird quirk of their API, I guess. --- i3pystatus/weather/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i3pystatus/weather/__init__.py b/i3pystatus/weather/__init__.py index 7f1dd2e..8ac9eb8 100644 --- a/i3pystatus/weather/__init__.py +++ b/i3pystatus/weather/__init__.py @@ -121,7 +121,7 @@ class Weather(IntervalModule): condition = 'Partly Cloudy' else: condition = 'Cloudy' - elif 'thunder' in condition_lc: + elif 'thunder' in condition_lc or 't-storm' in condition_lc: condition = 'Thunderstorm' elif 'snow' in condition_lc: condition = 'Snow'