diff --git a/docs/widgets/info/weather.md b/docs/widgets/info/weather.md index 6357f0c05..ab13b6736 100644 --- a/docs/widgets/info/weather.md +++ b/docs/widgets/info/weather.md @@ -15,6 +15,8 @@ The free tier is all that's required, you will need to [register](https://www.we units: metric # or imperial apiKey: yourweatherapikey cache: 5 # Time in minutes to cache API responses, to stay within limits + format: # optional, Intl.NumberFormat options + maximumFractionDigits: 1 ``` You can optionally not pass a `latitude` and `longitude` and the widget will use your current location (requires a secure context, eg. HTTPS). diff --git a/src/components/widgets/weather/weather.jsx b/src/components/widgets/weather/weather.jsx index 08074ee5f..4ebb08c53 100644 --- a/src/components/widgets/weather/weather.jsx +++ b/src/components/widgets/weather/weather.jsx @@ -45,6 +45,7 @@ function Widget({ options }) { value: options.units === "metric" ? data.current.temp_c : data.current.temp_f, style: "unit", unit, + ...options.format, })} {data.current.condition.text}