Fix incorrect "Unavailable" Ambient sensors (#22734)
* Fix incorrect "Unavailable" Ambient sensors * Removed unnecessary cast
This commit is contained in:
1 parent
79facb82c6
commit
bab966fb29
1 file changed
+2
-3
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user