Wetter-Pill: Niederschlag = Höchstwert der nächsten 3 Std statt Tages-Max

weather.py get_weather_for_location: precip = max(h_precip[now_h:now_h+3])
(Fallback Tages-Max). map.js Pill zeigt '💧 X% (3h)'. Gilt auch fürs
Welten-Banner (geteiltes precip_prob-Feld) — behebt das 'ganzer Tag'-Problem
überall. Gespeicherte Tagebuch-Snapshots unberührt (historisch).
This commit is contained in:
rene 2026-06-05 20:01:32 +02:00
parent fd6be50762
commit aefdac87ad
8 changed files with 31 additions and 19 deletions

View file

@ -3,7 +3,7 @@
Router, State-Management, Navigation, Initialisierung.
============================================================ */
const APP_VER = '1213'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const APP_VER = '1214'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const APP_VERSION = '1.6.0'; // ← semantische Version, wird bei make release gesetzt
window.APP_VER = APP_VER; // global verfügbar für andere Module (z.B. offline-indicator)
window.APP_VERSION = APP_VERSION;

View file

@ -2597,8 +2597,9 @@ window.Page_map = (() => {
const w = await API.weather.get(lat, lon);
const temp = w.temp_c != null ? `${Math.round(w.temp_c)}°` : '';
const icon = `<svg class="ph-icon" aria-hidden="true" style="width:12px;height:12px;vertical-align:-2px"><use href="/icons/phosphor.svg#${w.icon}"></use></svg>`;
// precip_prob = Höchstwert der nächsten 3 Stunden → Fenster im Pill kennzeichnen.
const regen = w.precip_prob != null
? (w.next_rain_time ? ` · 💧 ${w.precip_prob}% ab ${w.next_rain_time}` : ` · 💧 ${w.precip_prob}%`)
? ` · 💧 ${w.precip_prob}% (3h)${w.next_rain_time ? ` ab ${w.next_rain_time}` : ''}`
: '';
const warning = w.rain_warning_time
? ` · <span style="color:#f59e0b;font-weight:700">⚠ ab ${w.rain_warning_time}</span>`