Skip to content

Weather

Settings

Key Value
CONFIG weather
ENV N/A
URL N/A
VALUE []WeatherLocation
DEFAULT []
Using with config.yaml file
weather:
- name: london
lat: 51.5285262
lon: -0.2663999
api: API_KEY
unit: metric
lang: en
default: false

You can configure multiple locations in the config.yaml file, and choose which one to display using the URL query weather=NAME.

ValueDescription
nameThe location’s display name (used in the URL query).
latLatitude of the location.
lonLongitude of the location.
apiOpenWeatherMap API key.
unitUnits of measurement (standard, metric, or imperial).
langLanguage code for weather descriptions (see the full list here).
defaultSet this location as the default (when no location is specified)

Here’s an example of how to add London, London using OpenWeatherMap’s name and New York to the config.yaml file. These locations would be selectable via the URL, like this: http://{URL}?weather=london or http://{URL}?weather=new-york.

weather:
- name: london
lat: 51.5285262
lon: -0.2663999
api: API_KEY
unit: metric
lang: en
default: true
- name: london-api
lat: 51.5285262
lon: -0.2663999
api: API_KEY
unit: metric
lang: en
- name: new-york
lat: 40.6973709
lon: -74.1444838
api: API_KEY
unit: imperial
lang: en