Weather: default to 5-day forecast, add weekday+date header line

- forecast_days now defaults to 5 (was 3) across default_settings(),
  check()'s fallback, and the settings form's pre-selected option.
- New show_date setting (on by default): weekday + date in the same
  "Samstag, 25. Juli" format Clock already used. Combined with the
  city name into one header line above the icon/temp block when both
  are on ("Münster · Samstag, 25. Juli"), each independently
  toggleable.
- Moved the weekday/month name lists and the "Weekday, D. Month"
  formatting out of clock.py into render_utils.format_date_de(), so
  Weather reuses the exact same formatting instead of a second copy
  that could drift.
This commit is contained in:
Honey committed 2026-07-25 10:38:14 +02:00
1 parent 78337a99d2
commit 7601f746fe
5 files changed
+50 -32

No files matched your search

+3 -2
View File
@@ -66,12 +66,13 @@ def create_app(config, screens: dict, scheduler) -> Flask:
city = request.form.get("city", "").strip()
lat_raw = request.form.get("latitude", "").strip()
lon_raw = request.form.get("longitude", "").strip()
forecast_days = int(request.form.get("forecast_days", 3) or 3)
forecast_days = int(request.form.get("forecast_days", 5) or 5)
if forecast_days not in (3, 5, 7):
forecast_days = 3
forecast_days = 5
update_minutes = max(1, int(request.form.get("update_minutes", 30) or 30))
display_toggles = {
"show_city": "show_city" in request.form,
"show_date": "show_date" in request.form,
"show_hourly_graph": "show_hourly_graph" in request.form,
"show_feels_like": "show_feels_like" in request.form,
"show_high_low": "show_high_low" in request.form,