Hourly forecast time is string (#70390)

This commit is contained in:
duncanvanzyl 2022-04-26 12:45:33 -04:00 committed by GitHub
parent 3460abba54
commit 2ea2e2e65b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -212,7 +212,7 @@ def get_forecast(ec_data, hourly):
for hour in ec_data.hourly_forecasts: for hour in ec_data.hourly_forecasts:
forecast_array.append( forecast_array.append(
{ {
ATTR_FORECAST_TIME: hour["period"], ATTR_FORECAST_TIME: hour["period"].isoformat(),
ATTR_FORECAST_TEMP: int(hour["temperature"]), ATTR_FORECAST_TEMP: int(hour["temperature"]),
ATTR_FORECAST_CONDITION: icon_code_to_condition( ATTR_FORECAST_CONDITION: icon_code_to_condition(
int(hour["icon_code"]) int(hour["icon_code"])