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.
This commit is contained in:
Erik Johnson 2016-05-02 21:47:07 -05:00
parent 682961f956
commit da104268ab

View File

@ -121,7 +121,7 @@ class Weather(IntervalModule):
condition = 'Partly Cloudy' condition = 'Partly Cloudy'
else: else:
condition = 'Cloudy' condition = 'Cloudy'
elif 'thunder' in condition_lc: elif 'thunder' in condition_lc or 't-storm' in condition_lc:
condition = 'Thunderstorm' condition = 'Thunderstorm'
elif 'snow' in condition_lc: elif 'snow' in condition_lc:
condition = 'Snow' condition = 'Snow'