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:
parent
fd6be50762
commit
aefdac87ad
8 changed files with 31 additions and 19 deletions
|
|
@ -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>`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue