From 19e984174c736e6a50ed8bc739fd6db5f9198b98 Mon Sep 17 00:00:00 2001 From: Diogo Gomes Date: Mon, 17 Aug 2020 13:59:42 +0100 Subject: [PATCH] Add percipitation_probability (#63) --- dist/weather-card.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dist/weather-card.js b/dist/weather-card.js index 1f59700a..f1c342a1 100644 --- a/dist/weather-card.js +++ b/dist/weather-card.js @@ -297,6 +297,15 @@ class WeatherCard extends LitElement { ` : ""} + ${!this._config.hide_precipitation && + daily.precipitation_probability !== undefined && + daily.precipitation_probability !== null + ? html` +
+ ${daily.precipitation_probability} ${this.getUnit("precipitation_probability")} +
+ ` + : ""} ` )} @@ -325,6 +334,8 @@ class WeatherCard extends LitElement { return lengthUnit; case "precipitation": return lengthUnit === "km" ? "mm" : "in"; + case "precipitation_probability": + return "%"; default: return this.hass.config.unit_system[measure] || ""; }