1
0
mirror of https://github.com/elisspace/core.git synced 2026-09-01 00:44:04 +00:00

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 Paulus Schoutsen
parent 79facb82c6
commit bab966fb29

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):