Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mcarbonne committed Feb 25, 2023
1 parent 14e79e8 commit 3296759
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dist/meteo-france-weather-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function processForecast(lang, forecast) {
}

processedForecast.push({
date: hourMode ? date.toLocaleTimeString(lang, {hour: "2-digit"}) : date.toLocaleDateString(lang, {weekday: "short"}),
formattedDate: hourMode ? date.toLocaleTimeString(lang, {hour: "2-digit"}) : date.toLocaleDateString(lang, {weekday: "short"}),
condition: forecast[i].condition.toLowerCase(),
temperature: forecast[i].temperature,
templow : forecast[i].templow,
Expand Down Expand Up @@ -207,7 +207,6 @@ class WeatherCard extends LitElement {
const alertObj = this.hass.states[this._config.alertEntity];
const rainForecastObj = this.hass.states[this._config.rainForecastEntity];
const uvObj = this.hass.states[this._config.uvEntity];
const processedForecast = processForecast(stateObj.attributes.forecast);

if (!stateObj) {
return html`
Expand All @@ -227,6 +226,7 @@ class WeatherCard extends LitElement {
}

const lang = this.hass.selectedLanguage || this.hass.language;
const processedForecast = processForecast(lang, stateObj.attributes.forecast);

const next_rising = new Date(
this.hass.states["sun.sun"].attributes.next_rising
Expand Down

0 comments on commit 3296759

Please sign in to comment.