Fix misaligned high/low temperatures in weather card (#49826)
This commit is contained in:
parent
de2dc92741
commit
ae86e96d34
1 changed files with 3 additions and 2 deletions
|
@ -202,16 +202,17 @@ def get_forecast(ec_data, forecast_type):
|
||||||
ATTR_FORECAST_TEMP_LOW: int(half_days[1]["temperature"]),
|
ATTR_FORECAST_TEMP_LOW: int(half_days[1]["temperature"]),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
half_days = half_days[2:]
|
||||||
else:
|
else:
|
||||||
today.update(
|
today.update(
|
||||||
{
|
{
|
||||||
|
ATTR_FORECAST_TEMP: None,
|
||||||
ATTR_FORECAST_TEMP_LOW: int(half_days[0]["temperature"]),
|
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)
|
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)):
|
for day, high, low in zip(range(1, 6), range(0, 9, 2), range(1, 10, 2)):
|
||||||
forecast_array.append(
|
forecast_array.append(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue