{#if current}

Weather Details

💨 Wind
Speed {Math.round(current.wind_speed_10m)} {windUnit}
Direction {windCompass(current.wind_direction_10m)} ({current.wind_direction_10m}°)
Gusts {current.wind_gusts_10m != null ? Math.round(current.wind_gusts_10m) + ' ' + windUnit : '--'}
Condition {getBeaufort(current.wind_speed_10m)}
🌡️ Atmosphere
Humidity {current.relative_humidity_2m}%
Pressure {Math.round(current.pressure_msl || 0)} hPa
Feels Like {Math.round(current.apparent_temperature)}{unit}
Is Day {current.is_day ? '☀️ Yes' : '🌙 No'}
☀️ Sun & UV
UV Index {current.uv_index != null ? Math.round(current.uv_index) : '--'} {#if current.uv_index != null} {getUVLevel(current.uv_index)} {/if}
Sunrise {formatTime(daily?.sunrise?.[0] || '')}
Sunset {formatTime(daily?.sunset?.[0] || '')}
Max UV Today {daily?.uv_index_max?.[0] != null ? Math.round(daily.uv_index_max[0]) : '--'}
📊 Temperature Range
Today's High {daily?.temperature_2m_max?.[0] != null ? Math.round(daily.temperature_2m_max[0]) + unit : '--'}
Today's Low {daily?.temperature_2m_min?.[0] != null ? Math.round(daily.temperature_2m_min[0]) + unit : '--'}
{#if hourly} {@const temps = hourly.temperature_2m || []} {@const validTemps = temps.filter(t => t != null)} {#if validTemps.length > 0}
24h Average {Math.round(validTemps.reduce((a, b) => a + b, 0) / validTemps.length)}{unit}
{/if} {/if}
Precip Chance {daily?.precipitation_probability_max?.[0] || 0}%
Local time {data.timezone || '--'}
Data updated {current.time ? new Date(current.time).toLocaleTimeString() : '--'}
Elevation {data.elevation != null ? (app.settings.units === 'imperial' ? Math.round(data.elevation * 3.28084) + ' ft' : Math.round(data.elevation) + ' m') : '--'}
{/if}