From 0b2f467938d594aca65d81524ac9a881b54831c4 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Fri, 3 Jul 2020 22:20:58 +0200 Subject: [PATCH] Don't require sun --- dist/weather-card.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/weather-card.js b/dist/weather-card.js index 83dd0707..1f59700a 100644 --- a/dist/weather-card.js +++ b/dist/weather-card.js @@ -166,7 +166,7 @@ class WeatherCard extends LitElement { class="icon bigger" style="background: none, url('${this.getWeatherIcon( stateObj.state.toLowerCase(), - this.hass.states["sun.sun"].state + this.hass.states["sun.sun"] )}') no-repeat; background-size: contain;" >${stateObj.state} @@ -310,7 +310,7 @@ class WeatherCard extends LitElement { ? this._config.icons : "https://cdn.jsdelivr.net/gh/bramkragten/weather-card/dist/icons/" }${ - sun && sun == "below_horizon" + sun && sun.state == "below_horizon" ? weatherIconsNight[condition] : weatherIconsDay[condition] }.svg`;