Met.no: Fix for zero temp entries (#43684)

Addresses issue #43587
This commit is contained in:
Michael Thingnes 2020-11-27 20:07:49 +13:00 committed by GitHub
parent 3bd0c7188c
commit 69c2818c56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -217,7 +217,9 @@ class MetWeather(CoordinatorEntity, WeatherEntity):
if not set(met_item).issuperset(required_keys):
continue
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) is not None
}
if ha_item.get(ATTR_FORECAST_CONDITION):
ha_item[ATTR_FORECAST_CONDITION] = format_condition(