Use Cloud State as alternative state if condition unknown (#37121)

This commit is contained in:
Harrison Pace 2020-09-22 17:01:58 +10:00 committed by GitHub
parent f34455b6c2
commit 8ad7b68c9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,7 +54,9 @@ class BOMWeather(WeatherEntity):
@property
def condition(self):
"""Return the current condition."""
return self.bom_data.get_reading("weather")
return self.bom_data.get_reading("weather") or self.bom_data.get_reading(
"cloud"
)
# Now implement the WeatherEntity interface