If next hour weather is different from now, display it
This commit is contained in:
parent
e7a1eac8d7
commit
b19f7a7f36
@ -139,7 +139,10 @@ class WeatherJumboCurrentModule:
|
|||||||
|
|
||||||
dayweather = WeatherAPI().get_hourly()
|
dayweather = WeatherAPI().get_hourly()
|
||||||
|
|
||||||
display_longtext(draw, (width*self.middle_align, height/1.28), dayweather["summary"], fill="black", anchor="lm", font=fnt_Rig, maxwidth=(1-self.middle_align)*width)
|
if dayweather["data"][0]["summary"] != dayweather["data"][1]["summary"]:
|
||||||
|
display_longtext(draw, (width*self.middle_align, height/1.28), dayweather["data"][1]["summary"] + " la prochaine heure.\n" + dayweather["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), dayweather["summary"], fill="black", anchor="lm", font=fnt_Rig, maxwidth=(1-self.middle_align)*width)
|
||||||
|
|
||||||
return image
|
return image
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user