homepage/docs/widgets/info/openweathermap.md

22 lines
852 B
Markdown
Raw Normal View History

2023-09-29 21:01:11 +03:00
---
title: OpenWeatherMap
description: OpenWeatherMap Information Widget Configuration
---
2023-10-22 00:12:37 +05:30
The free tier "One Call API" is all that's required, you will need to [subscribe](https://home.openweathermap.org/subscriptions/unauth_subscribe/onecall_30/base) and grab your API key.
2023-09-29 21:01:11 +03:00
```yaml
- openweathermap:
label: Kyiv #optional
latitude: 50.449684
longitude: 30.525026
units: metric # or imperial
provider: openweathermap
apiKey: youropenweathermapkey # required only if not using provider, this reveals api key in requests
cache: 5 # Time in minutes to cache API responses, to stay within limits
format: # optional, Intl.NumberFormat options
maximumFractionDigits: 1
2023-09-29 21:01:11 +03:00
```
You can optionally not pass a `latitude` and `longitude` and the widget will use your current location (requires a secure context, eg. HTTPS).