Fix incorrect "Unavailable" Ambient sensors (#22734)

* Fix incorrect "Unavailable" Ambient sensors

* Removed unnecessary cast
This commit is contained in:
Aaron Bach 2019-04-04 13:50:10 -06:00 committed by GitHub
parent 0438dffe25
commit 96adbfdc36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -417,9 +417,8 @@ class AmbientWeatherEntity(Entity):
@property
def available(self):
"""Return True if entity is available."""
return bool(
self._ambient.stations[self._mac_address][ATTR_LAST_DATA].get(
self._sensor_type))
return self._ambient.stations[self._mac_address][ATTR_LAST_DATA].get(
self._sensor_type) is not None
@property
def device_info(self):