tempestwx

body { margin: 0; font-family: Arial, sans-serif; background: transparent; } .lower-third { position: fixed; bottom: 0; left: 0; width: 100%; background: rgba(0, 0, 0, 0.5); color: white; padding: 10px; text-align: center; font-size: 1.5em; } async function updateWeather() { try { const response = await fetch(‘https://swd.weatherflow.com/swd/rest/observations/station/131876?token=9941f7e0-87c7-4709-bc1b-6c55c4f276c7’); const data = await response.json(); // Assuming the JSON structure includes observations as `obs` array const temperature = data.obs[0].air_temperature; // Temperature in °C const windSpeed = data.obs[0].wind_speed; // Wind speed in m/s // Update the lower-third text content document.getElementById(‘weather’).innerText = `Temperature: ${temperature}°C | Wind Speed: ${windSpeed} m/s`; } catch (error) { console.error(‘Error fetching weather data:’, error); document.getElementById(‘weather’).innerText = ‘Error loading weather data.’; } } // Set interval to refresh the data every minute setInterval(updateWeather, 60000); // Update every 60 seconds window.onload = updateWeather; // Initial load
Loading weather data…