weather: Improve next hour
This commit is contained in:
parent
1893e7c201
commit
452a6097e3
@ -147,8 +147,10 @@ class WeatherJumboCurrentModule:
|
||||
|
||||
dayweather = list(itertools.islice(WeatherAPI().get_hourly(), 2))
|
||||
|
||||
if dayweather[0]["weather"][0]["description"] != dayweather[1]["weather"][0]["description"]:
|
||||
display_longtext(draw, (width*self.middle_align, height/1.28), dayweather[1]["weather"][0]["description"] + " la prochaine heure.\n" + thisdayweather["summary"] + ".", fill="black", anchor="lm", font=fnt_Rig, maxwidth=(1-self.middle_align)*width)
|
||||
if dayweather[0]["weather"][0]["description"] != curweather["weather"][0]["description"]:
|
||||
description = dayweather[0]["weather"][0]["description"]
|
||||
description = description[0].upper() + description[1:]
|
||||
display_longtext(draw, (width*self.middle_align, height/1.28), description + " la prochaine heure.\n" + thisdayweather["summary"] + ".", fill="black", anchor="lm", font=fnt_Rig, maxwidth=(1-self.middle_align)*width)
|
||||
else:
|
||||
display_longtext(draw, (width*self.middle_align, height/1.28), thisdayweather["summary"] + ".", fill="black", anchor="lm", font=fnt_Rig, maxwidth=(1-self.middle_align)*width)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user