You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/datasources/openmeteo.md
+34-3Lines changed: 34 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,14 @@
1
1
# Open-Meteo Weather Datasource
2
2
3
-
The Open-Meteo datasource fetches current weather data for any location worldwide using the free Open-Meteo API. It automatically geocodes location names and provides comprehensive weather information including temperature, wind, humidity, pressure, and UV index.
3
+
The Open-Meteo datasource fetches current weather data and hourly forecasts for any location worldwide using the free Open-Meteo API. It automatically geocodes location names and provides comprehensive weather information including temperature, wind, humidity, pressure, UV index, and rain predictions.
4
4
5
5
## Features
6
6
7
7
- 🌍 **Worldwide Coverage** - Fetch weather for any location globally
8
8
- 📍 **Automatic Geocoding** - Simply provide a location name (city, town, etc.)
@@ -79,6 +81,21 @@ The datasource stores the following fields for each weather report:
79
81
|`surface_pressure`| REAL | Surface pressure (hPa) |
80
82
|`sealevel_pressure`| REAL | Sea level pressure (hPa) |
81
83
|`uv_index`| REAL | Maximum UV index for the day |
84
+
|`hourly_forecast`| TEXT | JSON array of hourly forecast data for today (24 hours) |
85
+
86
+
### Hourly Forecast Data
87
+
88
+
Each hourly forecast entry contains:
89
+
90
+
| Field | Type | Description |
91
+
|-------|------|-------------|
92
+
|`time`| TEXT | ISO 8601 timestamp for the hour |
93
+
|`temperature`| REAL | Hourly temperature (°C) |
94
+
|`weather_code`| INTEGER | WMO weather code for the hour |
95
+
|`weather_description`| TEXT | Human-readable condition |
96
+
|`precipitation`| REAL | Precipitation amount (mm) |
97
+
|`precipitation_probability`| INTEGER | Chance of precipitation (%) |
98
+
|`humidity`| REAL | Relative humidity (%) |
82
99
83
100
## Weather Codes and Icons
84
101
@@ -166,11 +183,24 @@ When fetching or streaming data, you'll see output like this:
166
183
This datasource uses the free [Open-Meteo API](https://open-meteo.com/):
167
184
168
185
-**Geocoding**: `geocoding-api.open-meteo.com` - Converts location names to coordinates
169
-
-**Weather Data**: `api.open-meteo.com` - Provides current weather and forecasts
186
+
-**Weather Data**: `api.open-meteo.com` - Provides current weather and 24-hour forecasts
170
187
-**Air Quality**: `air-quality-api.open-meteo.com` - UV index and air quality data
171
188
-**No API Key Required**: Free for non-commercial use
172
189
-**Attribution**: Data provided by Open-Meteo.com
173
190
191
+
## Rain Prediction & Forecast Display
192
+
193
+
The weather renderer includes:
194
+
195
+
-**Rain Alert Badge** - Prominent alert when rain is expected today, showing maximum precipitation probability
196
+
-**Collapsible Hourly Forecast** - Interactive table with 24-hour forecast including:
197
+
- Time and weather condition icons
198
+
- Hourly temperature
199
+
- Precipitation amount and probability
200
+
- Humidity levels
201
+
202
+
The rain detection automatically checks all hourly forecasts for rain codes (51-82) and displays an alert if rain is expected at any point during the day.
203
+
174
204
## Location Examples
175
205
176
206
You can use various location formats:
@@ -200,8 +230,9 @@ location = 'København'
200
230
-**API Rate Limits**: Open-Meteo is free but has reasonable rate limits
201
231
-**Update Frequency**: Weather data typically updates every 15-60 minutes
202
232
-**Recommended Interval**: 30 minutes to 1 hour is usually sufficient
203
-
-**Storage**: Creates one block per fetch, deduplicates based on weather conditions
233
+
-**Storage**: Creates one block per fetch with 24-hour forecast data, deduplicates based on weather conditions
204
234
-**Network**: Requires 3 API calls per fetch (geocoding, weather, air quality)
235
+
-**Forecast Data**: Stores up to 24 hours of hourly forecast data per block
0 commit comments