If next hour weather is different from now, display it
This commit is contained in:
parent
e7a1eac8d7
commit
b19f7a7f36
@ -139,6 +139,9 @@ class WeatherJumboCurrentModule:
|
|||||||
|
|
||||||
dayweather = WeatherAPI().get_hourly()
|
dayweather = WeatherAPI().get_hourly()
|
||||||
|
|
||||||
|
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)
|
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