Skip to content

Commit 399ce01

Browse files
committed
Remove icon and make precipitation optional
1 parent 1abd4f4 commit 399ce01

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

dist/weather-card.js

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,10 @@ class WeatherCard extends LitElement {
151151
<div class="current ${this.numberElements > 1 ? "spacer" : ""}">
152152
<span
153153
class="icon bigger"
154-
style="background: none, url(${this.getWeatherIcon(
154+
style="background: none, url('${this.getWeatherIcon(
155155
stateObj.state.toLowerCase(),
156156
this.hass.states["sun.sun"].state
157-
)}) no-repeat; background-size: contain;"
157+
)}') no-repeat; background-size: contain;"
158158
>${stateObj.state}
159159
</span>
160160
${this._config.name
@@ -251,9 +251,9 @@ class WeatherCard extends LitElement {
251251
</div>
252252
<i
253253
class="icon"
254-
style="background: none, url(${this.getWeatherIcon(
254+
style="background: none, url('${this.getWeatherIcon(
255255
daily.condition.toLowerCase()
256-
)}) no-repeat; background-size: contain;"
256+
)}') no-repeat; background-size: contain;"
257257
></i>
258258
<div class="highTemp">
259259
${daily.temperature}${this.getUnit("temperature")}
@@ -265,11 +265,11 @@ class WeatherCard extends LitElement {
265265
</div>
266266
`
267267
: ""}
268-
${daily.precipitation !== undefined &&
268+
${!this._config.hide_precipitation &&
269+
daily.precipitation !== undefined &&
269270
daily.precipitation !== null
270271
? html`
271272
<div class="precipitation">
272-
<ha-icon icon="mdi:weather-rainy"></ha-icon>
273273
${daily.precipitation} ${this.getUnit("precipitation")}
274274
</div>
275275
`
@@ -447,10 +447,6 @@ class WeatherCard extends LitElement {
447447
font-weight: 300;
448448
}
449449
450-
.precipitation ha-icon {
451-
height: 18px;
452-
}
453-
454450
.icon.bigger {
455451
width: 10em;
456452
height: 10em;

0 commit comments

Comments
 (0)