From e1e6f446363e65e6b65b86a04400b1b5163a3b16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Vanegas?= Date: Sat, 14 Feb 2026 22:51:43 -0500 Subject: [PATCH] feat: add weatherapi options to weather module configuration --- modules/weather.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/weather.md b/modules/weather.md index 5ddd96f5..6eec3411 100755 --- a/modules/weather.md +++ b/modules/weather.md @@ -43,7 +43,7 @@ The following properties can be configured: | Option | Description | | ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `weatherProvider` | Which weather provider should be used.

**Possible values:** `openweathermap` , `pirateweather` , `weathergov`, `ukmetofficedatahub`, `weatherbit`, `envcanada`, `openmeteo`, `weatherflow`, `SMHI` or `yr`
**Default value:** `openweathermap` | +| `weatherProvider` | Which weather provider should be used.

**Possible values:** `openweathermap` , `pirateweather` , `weathergov`, `ukmetofficedatahub`, `weatherbit`, `envcanada`, `openmeteo`, `weatherflow`, `SMHI`, `weatherapi` or `yr`
**Default value:** `openweathermap` | | `type` | Which type of weather data should be displayed.

**Possible values:** `current` , `hourly` , `daily` , or `forecast`
**Default value:** `current`

**Note:** The `daily` type is another name for the `forecast` type, and the two are interchangeable.

The `hourly` type is currently only implemented for these provider:
- **Environment Canada** (`envcanada`)
- **Openmeteo**
- **OpenWeatherMap** (`openweathermap`), and only when `/onecall` is used as the specified endpoint. Latitude and longitude [(see below)](/modules/weather#openweathermap-options) are **required** for `hourly`. The locationID and location options are ignored when the OpenWeatherMap One Call API is used and you will get wrong weather information.
- **Weather.gov** (`weathergov`)
- **Yr** (`yr`) | | `units` | What units to use. Specified by config.js

**Possible values:** `config.units` = Specified by config.js, `metric` = Celsius, `imperial` = Fahrenheit
**Default value:** `config.units` | | `tempUnits` | What units to use for temperature. If not specified, the module uses the `units` value from `config.js`.

**Possible values:** `config.units` = Specified by config.js, `metric` = Celsius, `imperial` = Fahrenheit
**Default value:** `config.units` | @@ -193,6 +193,15 @@ hours. | `maxNumberOfDays` | How many days of forecast to return. Specified by config.js

**Possible values:** `1` - `8`
**Default value:** `5` (5 days)
This value is optional. By default the weather module will return 5 days. | | `pastDays` | How many days should forecast should include from historic data. Specified by config.js

**Possible values:** `0` - `5`
**Default value:** `0` (0 days)
This value is optional. By default the weather module will return 0 days from historical data.

**Note:** Since Open-Meteo returns 8 days of data at all, this setting could reduce the range of forecast data set on `maxNumberOfDays`. e.g. if `maxNumberOFDays` is set to `7` and `pastDays` is set to `5`, data received will be from 5 days from the past to 2 days in the future (8 days) | +### Weather API (`weatherapi`) options + +| Option | Description | +| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| `apiBase` | The Weather API base URL.

**Possible value:** `https://api.weatherapi.com/v1`
This value is **REQUIRED** | +| `apiKey` | The [Weather API](https://www.weatherapi.com) key which can be obtained by creating an Weather API account

This value is **REQUIRED** | +| `lat` | The latitude coordinate for the desired location.

**Possible value:** `59.322665`
This value is **REQUIRED** | +| `lon` | The longitude coordinate for the desired location.

**Possible value:** `18.069666`
This value is **REQUIRED** | + ### Yr options The Yr weather provider is quite simple to set up, and only requires the