Included check for Met Office DataHub provider.

The new Met Office provider also returns precipitation as a probability percentage.
This commit is contained in:
CreepinJesus
2020-06-28 11:00:10 +01:00
committed by GitHub
parent dd32d3a492
commit 4339cdd8a4

View File

@@ -208,7 +208,7 @@ Module.register("weather", {
if (isNaN(value) || value === 0 || value.toFixed(2) === "0.00") {
value = "";
} else {
if (this.config.weatherProvider === "ukmetoffice") {
if (this.config.weatherProvider === "ukmetoffice" || this.config.weatherProvider === "ukmetofficedatahub") {
value += "%";
} else {
value = `${value.toFixed(2)} ${this.config.units === "imperial" ? "in" : "mm"}`;