Updated forecast summary
This commit is contained in:
@@ -205,7 +205,7 @@ function summarise(slots) {
|
|||||||
time: slots[0].time.slice(0, 10),
|
time: slots[0].time.slice(0, 10),
|
||||||
label: dominant.label,
|
label: dominant.label,
|
||||||
code: dominant.code,
|
code: dominant.code,
|
||||||
icon: dominant.icon ?? null,
|
icon: `/icons/${dominant.icon}.png`,
|
||||||
temperature: Math.max(...temps),
|
temperature: Math.max(...temps),
|
||||||
temperature_max: Math.max(...temps),
|
temperature_max: Math.max(...temps),
|
||||||
temperature_min: Math.min(...temps),
|
temperature_min: Math.min(...temps),
|
||||||
|
|||||||
@@ -212,7 +212,6 @@ export async function hourlyWeather(lat, lon, start, end) {
|
|||||||
uv_index: uv,
|
uv_index: uv,
|
||||||
uv_index_label: uvLabel(uv),
|
uv_index_label: uvLabel(uv),
|
||||||
solar_wm2: data.hourly.shortwave_radiation[i],
|
solar_wm2: data.hourly.shortwave_radiation[i],
|
||||||
clouds,
|
|
||||||
clouds_label: cloudsLabel(clouds),
|
clouds_label: cloudsLabel(clouds),
|
||||||
visibility: data.hourly.visibility[i] != null
|
visibility: data.hourly.visibility[i] != null
|
||||||
? Math.round(data.hourly.visibility[i] / 1000 * 10) / 10 // m → km
|
? Math.round(data.hourly.visibility[i] / 1000 * 10) / 10 // m → km
|
||||||
|
|||||||
Reference in New Issue
Block a user