mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-18 14:56:37 +00:00
This commit is contained in:
parent
05ac275780
commit
e83ede245d
@ -150,9 +150,9 @@ class HuiWeatherForecastCard extends LitElement implements LovelaceCard {
|
|||||||
|
|
||||||
let hourly: boolean | undefined;
|
let hourly: boolean | undefined;
|
||||||
|
|
||||||
if (forecast?.length && forecast?.length > 1) {
|
if (forecast?.length && forecast?.length > 2) {
|
||||||
const date1 = new Date(forecast[0].datetime);
|
const date1 = new Date(forecast[1].datetime);
|
||||||
const date2 = new Date(forecast[1].datetime);
|
const date2 = new Date(forecast[2].datetime);
|
||||||
const timeDiff = date2.getTime() - date1.getTime();
|
const timeDiff = date2.getTime() - date1.getTime();
|
||||||
|
|
||||||
hourly = timeDiff < DAY_IN_MILLISECONDS;
|
hourly = timeDiff < DAY_IN_MILLISECONDS;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user