Skip to content

Commit

Permalink
Remove icon and make precipitation optional
Browse files Browse the repository at this point in the history
  • Loading branch information
bramkragten committed Aug 9, 2019
1 parent 1abd4f4 commit 399ce01
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions dist/weather-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ class WeatherCard extends LitElement {
<div class="current ${this.numberElements > 1 ? "spacer" : ""}">
<span
class="icon bigger"
style="background: none, url(${this.getWeatherIcon(
style="background: none, url('${this.getWeatherIcon(
stateObj.state.toLowerCase(),
this.hass.states["sun.sun"].state
)}) no-repeat; background-size: contain;"
)}') no-repeat; background-size: contain;"
>${stateObj.state}
</span>
${this._config.name
Expand Down Expand Up @@ -251,9 +251,9 @@ class WeatherCard extends LitElement {
</div>
<i
class="icon"
style="background: none, url(${this.getWeatherIcon(
style="background: none, url('${this.getWeatherIcon(
daily.condition.toLowerCase()
)}) no-repeat; background-size: contain;"
)}') no-repeat; background-size: contain;"
></i>
<div class="highTemp">
${daily.temperature}${this.getUnit("temperature")}
Expand All @@ -265,11 +265,11 @@ class WeatherCard extends LitElement {
</div>
`
: ""}
${daily.precipitation !== undefined &&
${!this._config.hide_precipitation &&
daily.precipitation !== undefined &&
daily.precipitation !== null
? html`
<div class="precipitation">
<ha-icon icon="mdi:weather-rainy"></ha-icon>
${daily.precipitation} ${this.getUnit("precipitation")}
</div>
`
Expand Down Expand Up @@ -447,10 +447,6 @@ class WeatherCard extends LitElement {
font-weight: 300;
}
.precipitation ha-icon {
height: 18px;
}
.icon.bigger {
width: 10em;
height: 10em;
Expand Down

0 comments on commit 399ce01

Please sign in to comment.