Fix icons
This commit is contained in:
@@ -152,7 +152,7 @@ export async function get24HourForecast(currentSensors) {
|
||||
const wind_speed = forecastWind(seedWind, pressureTrend);
|
||||
|
||||
const celestial = getCelestialCurrent(coords.latitude, coords.longitude, time);
|
||||
const snapshot = {
|
||||
let snapshot = {
|
||||
time,
|
||||
temperature,
|
||||
humidity,
|
||||
@@ -167,7 +167,9 @@ export async function get24HourForecast(currentSensors) {
|
||||
...celestial
|
||||
};
|
||||
|
||||
return Object.assign(snapshot, getWeatherCondition(snapshot));
|
||||
Object.assign(snapshot, getWeatherCondition(snapshot));
|
||||
snapshot.icon = `/icons/${snapshot.icon}.png`;
|
||||
return snapshot;
|
||||
});
|
||||
|
||||
// Second pass — apply solar heating now that we have sun_elevation per slot
|
||||
@@ -213,7 +215,7 @@ function summarise(slots) {
|
||||
time: slots[0].time,
|
||||
label: dominant.label,
|
||||
code: dominant.code,
|
||||
icon: `/icons/${dominant.icon}.png`,
|
||||
icon: dominant.icon,
|
||||
temperature: Math.max(...temps),
|
||||
temperature_max: Math.max(...temps),
|
||||
temperature_min: Math.min(...temps),
|
||||
|
||||
Reference in New Issue
Block a user