v.0.7.2 loop over a city list

This commit is contained in:
tiijay
2025-11-14 11:39:17 +01:00
parent 3351dfd1b0
commit 37afe9e391

View File

@@ -3,6 +3,9 @@ from app.display.fonts import font_5x7
from app.tryout import Font_Checker, Weather_Checker, Emoji_Checker from app.tryout import Font_Checker, Weather_Checker, Emoji_Checker
from app.utils import show_system_load from app.utils import show_system_load
from app.web import Wlan from app.web import Wlan
import time
CITY_LIST: list[str]= ["Großhansdorf","Columbus", "London", "Ebeltoft", "Tokio"]
# Programm Startpunkt # Programm Startpunkt
if __name__ == '__main__': if __name__ == '__main__':
@@ -19,6 +22,10 @@ if __name__ == '__main__':
# tryout.weather_check(display, test_mode=False) # tryout.weather_check(display, test_mode=False)
display.set_font(font_5x7) display.set_font(font_5x7)
weather_checker: Weather_Checker = Weather_Checker( display=display) weather_checker: Weather_Checker = Weather_Checker( display=display)
weather_checker.check(city="Columbus", lang="de", test_mode=False)
while True:
for city in sorted(CITY_LIST):
weather_checker.check(city=city, lang="de", test_mode=False)
time.sleep(5*60)
# show_system_load() # show_system_load()