Fix Met.no missing conditions in API forecasts (#40373)

This commit is contained in:
Michael Thingnes 2020-09-21 09:56:04 +12:00 committed by Franck Nijhof
parent b3e2426967
commit babaf48867
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3

View File

@ -214,6 +214,7 @@ class MetWeather(CoordinatorEntity, WeatherEntity):
ha_item = { ha_item = {
k: met_item[v] for k, v in FORECAST_MAP.items() if met_item.get(v) k: met_item[v] for k, v in FORECAST_MAP.items() if met_item.get(v)
} }
if ha_item.get(ATTR_FORECAST_CONDITION):
ha_item[ATTR_FORECAST_CONDITION] = format_condition( ha_item[ATTR_FORECAST_CONDITION] = format_condition(
ha_item[ATTR_FORECAST_CONDITION] ha_item[ATTR_FORECAST_CONDITION]
) )