Skip to content

Commit

Permalink
Ne pas afficher la direction du vent si 'undefined'. (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
Axellum authored Nov 8, 2020
1 parent a38129e commit dbc76eb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dist/meteofrance-weather-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,7 @@ class MeteofranceWeatherCard extends LitElement {
<!-- Cloudy -->
${this.renderMeteoFranceDetail(this.hass.states[this._config.cloudCoverEntity])}
<!-- Wind -->
${this.renderDetail(windDirections[parseInt((stateObj.attributes.wind_bearing + 11.25) / 22.5)] + " " + stateObj.attributes.wind_speed, "Vent", "mdi:weather-windy",
this.getUnit("speed"))}
${this.renderDetail((stateObj.attributes.wind_bearing == undefined ? " " : windDirections[parseInt((stateObj.attributes.wind_bearing + 11.25) / 22.5)] + " ") + stateObj.attributes.wind_speed, "Vent", "mdi:weather-windy", this.getUnit("speed"))}
<!-- Rain -->
${this.renderMeteoFranceDetail(this.hass.states[this._config.rainChanceEntity])}
<!-- Humidity -->
Expand Down

0 comments on commit dbc76eb

Please sign in to comment.