2022-01-26 23:09:26 +01:00
|
|
|
/* MagicMirror² Test config default weather
|
2021-04-11 21:55:30 +02:00
|
|
|
*
|
2021-04-11 22:43:47 +02:00
|
|
|
* By rejas
|
2021-04-11 21:55:30 +02:00
|
|
|
* MIT Licensed.
|
|
|
|
*/
|
2021-10-16 00:05:12 +02:00
|
|
|
let config = {
|
2021-04-11 21:55:30 +02:00
|
|
|
units: "imperial",
|
|
|
|
|
|
|
|
modules: [
|
|
|
|
{
|
|
|
|
module: "weather",
|
|
|
|
position: "bottom_bar",
|
|
|
|
config: {
|
|
|
|
type: "forecast",
|
|
|
|
location: "Munich",
|
2021-10-16 00:05:12 +02:00
|
|
|
mockData: '"#####WEATHERDATA#####"',
|
2021-04-11 21:55:30 +02:00
|
|
|
weatherEndpoint: "/forecast/daily",
|
Tidy up precipitation (#3023)
Fixes #2953
This is an attempt to fix the issue with precipitation amount and
percentage mixup. I have created a separate
`precipitationPercentage`-variable where the probability of rain can be
stored.
The config options now has the old `showPrecipitationAmount` in addition
to a new setting: `showPrecipitationProbability` (shows the likelihood
of rain).
<details>
<summary>Examples</summary>
### Yr
I tested the Yr weather provider for a Norwegian city Bergen that has a
lot of rain. I have removed properties that are irrelevant for this demo
from the config-samples below.
Config:
```js
{
module: "weather",
config: {
weatherProvider: "yr",
type: "current",
showPrecipitationAmount: true,
showPrecipitationProbability: true
}
},
{
module: "weather",
config: {
weatherProvider: "yr",
type: "hourly",
showPrecipitationAmount: true,
showPrecipitationProbability: true
}
},
{
module: "weather",
config: {
weatherProvider: "yr",
type: "daily",
showPrecipitationAmount: true,
showPrecipitationProbability: true
}
}
```
Result:<br/>
<img width="444" alt="screenshot"
src="https://user-images.githubusercontent.com/34011212/216775423-4e37345c-f915-47e5-8551-7c544ebd24b1.png">
</details>
---------
Co-authored-by: Magnus Marthinsen <magmar@online.no>
Co-authored-by: Veeck <github@veeck.de>
2023-02-04 19:02:55 +01:00
|
|
|
decimalSymbol: "_",
|
|
|
|
showPrecipitationAmount: true
|
2021-04-11 21:55:30 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2021-10-16 00:05:12 +02:00
|
|
|
};
|
2021-07-05 00:33:50 +02:00
|
|
|
|
2021-04-11 21:55:30 +02:00
|
|
|
/*************** DO NOT EDIT THE LINE BELOW ***************/
|
|
|
|
if (typeof module !== "undefined") {
|
|
|
|
module.exports = config;
|
|
|
|
}
|