weather-forecast
The weather-forecast block provides a 3-day weather forecast for the default location configured in the system. Its outputs return the weather category and the minimum and maximum temperature for today, tomorrow, and the day after tomorrow.
Configuration parameters
| Parameter name | Value |
|---|---|
Refresh interval (refresh_interval_hours) |
Required value specifying how often, in hours, the forecast should be refreshed. Allowed values: 3, 6, 9, 12. |
Input handling
The weather-forecast block has no inputs. Values sent to this block are ignored.
Block outputs
| Output number and name | Output description |
|---|---|
| 1. Forecast today. | Numeric weather category for today. |
| 2. Minimum temperature today. | Minimum temperature forecast for today, with 0.1°C precision. |
| 3. Maximum temperature today. | Maximum temperature forecast for today, with 0.1°C precision. |
| 4. Forecast tomorrow. | Numeric weather category for tomorrow. |
| 5. Minimum temperature tomorrow. | Minimum temperature forecast for tomorrow, with 0.1°C precision. |
| 6. Maximum temperature tomorrow. | Maximum temperature forecast for tomorrow, with 0.1°C precision. |
| 7. Forecast the day after tomorrow. | Numeric weather category for the day after tomorrow. |
| 8. Minimum temperature the day after tomorrow. | Minimum temperature forecast for the day after tomorrow, with 0.1°C precision. |
| 9. Maximum temperature the day after tomorrow. | Maximum temperature forecast for the day after tomorrow, with 0.1°C precision. |
Forecast categories
A higher value means worse weather, so the category can be used in simple comparisons.
| Value | Category |
|---|---|
0 |
unknown |
1 |
clear |
2 |
partly cloudy |
3 |
cloudy |
4 |
overcast |
5 |
fog |
6 |
drizzle |
7 |
rain |
8 |
shower |
9 |
sleet |
10 |
snow |
11 |
ice |
12 |
thunder |
null values
All outputs return null when the system location is unavailable or when the forecast for the current location is not available yet.
If today's forecast is available but data for tomorrow or the day after tomorrow is missing, null is returned only on the outputs for the missing day.
Temperatures are rounded to one digit after the decimal point.
Errors returned by the block
| Message | Meaning |
|---|---|
Invalid refresh interval configuration. |
The refresh_interval_hours parameter is empty, is not an integer, or has a value other than 3, 6, 9, or 12. |
Location unavailable. |
The system default location is unavailable. |
Forecast unavailable. |
The forecast for the current location is not available yet. |
Examples
For today's clear forecast, minimum temperature 8.0°C, and maximum temperature 15.0°C, output 1 returns 1, output 2 returns 8.0°C, and output 3 returns 15.0°C. The block description is today clear 8.0..15.0°C.
For today's rain forecast, minimum temperature 6.5°C, and maximum temperature 12.0°C, output 1 returns 7, output 2 returns 6.5°C, and output 3 returns 12.0°C. The block description is today rain 6.5..12.0°C.