diff --git a/modules/default/weather/forecast.njk b/modules/default/weather/forecast.njk index 92a575cf..32a2e4a6 100644 --- a/modules/default/weather/forecast.njk +++ b/modules/default/weather/forecast.njk @@ -2,6 +2,9 @@ {% set numSteps = forecast | calcNumSteps %} {% set currentStep = 0 %} + {% if config.ignoreToday %} + {% set forecast = forecast.splice(1) %} + {% endif %} {% set forecast = forecast.slice(0, numSteps) %} {% for f in forecast %} @@ -20,10 +23,10 @@ {{ f.minTemperature | roundValue | unit("temperature") | decimalSymbol }} {% if config.showPrecipitationAmount %} - {% if f.precipitationUnits %} + {% if f.precipitationUnits %} + {% else %}
{{ f.precipitation }}{{ f.precipitationUnits }} - {{ f.precipitation | unit("precip") }} diff --git a/modules/default/weather/weather.js b/modules/default/weather/weather.js index 3386277c..62182211 100644 --- a/modules/default/weather/weather.js +++ b/modules/default/weather/weather.js @@ -132,10 +132,6 @@ Module.register("weather", { getTemplateData: function () { const forecast = this.weatherProvider.weatherForecast(); - if (this.config.ignoreToday) { - forecast.splice(0, 1); - } - return { config: this.config, current: this.weatherProvider.currentWeather(),