Fix misaligned high/low temperatures in weather card (#49826)

This commit is contained in:
Michael Davie 2021-06-07 21:23:44 -04:00 committed by GitHub
parent de2dc92741
commit ae86e96d34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -202,16 +202,17 @@ def get_forecast(ec_data, forecast_type):
ATTR_FORECAST_TEMP_LOW: int(half_days[1]["temperature"]),
}
)
half_days = half_days[2:]
else:
today.update(
{
ATTR_FORECAST_TEMP: None,
ATTR_FORECAST_TEMP_LOW: int(half_days[0]["temperature"]),
ATTR_FORECAST_TEMP: int(half_days[1]["temperature"]),
}
)
half_days = half_days[1:]
forecast_array.append(today)
half_days = half_days[2:]
for day, high, low in zip(range(1, 6), range(0, 9, 2), range(1, 10, 2)):
forecast_array.append(