diff --git a/src/main.js b/src/main.js index d008d91..f05372a 100644 --- a/src/main.js +++ b/src/main.js @@ -123,7 +123,7 @@ class WeatherChartCard extends LitElement { var lengthUnit = this._hass.config.unit_system.length; var precipUnit = lengthUnit === 'km' ? this.ll('uPrecip')[0] : this.ll('uPrecip')[1]; var forecast = weather.attributes.forecast.slice(0, forecastItems); - if (new Date(forecast[1].datetime) - new Date(forecast[0].datetime) === 36e5) + if ((new Date(forecast[1].datetime) - new Date(forecast[0].datetime)) < 864e5) var mode = 'hourly'; else var mode = 'daily';