Skip to content

Commit

Permalink
Add rounding to precipitation (#66)
Browse files Browse the repository at this point in the history
Co-authored-by: Diogo Gomes <[email protected]>
Co-authored-by: Bram Kragten <[email protected]>
  • Loading branch information
3 people authored Aug 18, 2020
1 parent 19e9841 commit 3aa9e2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dist/weather-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ class WeatherCard extends LitElement {
daily.precipitation !== null
? html`
<div class="precipitation">
${daily.precipitation} ${this.getUnit("precipitation")}
${Math.round(daily.precipitation*10)/10} ${this.getUnit("precipitation")}
</div>
`
: ""}
Expand All @@ -302,7 +302,7 @@ class WeatherCard extends LitElement {
daily.precipitation_probability !== null
? html`
<div class="precipitation_probability">
${daily.precipitation_probability} ${this.getUnit("precipitation_probability")}
${Math.round(daily.precipitation_probability)} ${this.getUnit("precipitation_probability")}
</div>
`
: ""}
Expand Down

0 comments on commit 3aa9e2b

Please sign in to comment.