mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-07-03 22:36:09 +00:00
Included check for Met Office DataHub provider.
The new Met Office provider also returns precipitation as a probability percentage.
This commit is contained in:
parent
dd32d3a492
commit
4339cdd8a4
@ -208,7 +208,7 @@ Module.register("weather", {
|
|||||||
if (isNaN(value) || value === 0 || value.toFixed(2) === "0.00") {
|
if (isNaN(value) || value === 0 || value.toFixed(2) === "0.00") {
|
||||||
value = "";
|
value = "";
|
||||||
} else {
|
} else {
|
||||||
if (this.config.weatherProvider === "ukmetoffice") {
|
if (this.config.weatherProvider === "ukmetoffice" || this.config.weatherProvider === "ukmetofficedatahub") {
|
||||||
value += "%";
|
value += "%";
|
||||||
} else {
|
} else {
|
||||||
value = `${value.toFixed(2)} ${this.config.units === "imperial" ? "in" : "mm"}`;
|
value = `${value.toFixed(2)} ${this.config.units === "imperial" ? "in" : "mm"}`;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user