Skip to content

Commit

Permalink
Add percipitation_probability (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgomes committed Aug 17, 2020
1 parent 2aa642e commit 19e9841
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions dist/weather-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,15 @@ class WeatherCard extends LitElement {
</div>
`
: ""}
${!this._config.hide_precipitation &&
daily.precipitation_probability !== undefined &&
daily.precipitation_probability !== null
? html`
<div class="precipitation_probability">
${daily.precipitation_probability} ${this.getUnit("precipitation_probability")}
</div>
`
: ""}
</div>
`
)}
Expand Down Expand Up @@ -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] || "";
}
Expand Down

0 comments on commit 19e9841

Please sign in to comment.