Skip to content

Commit

Permalink
Fix incorrect "Unavailable" Ambient sensors (#22734)
Browse files Browse the repository at this point in the history
* Fix incorrect "Unavailable" Ambient sensors

* Removed unnecessary cast
  • Loading branch information
bachya authored and balloob committed Apr 5, 2019
1 parent 79facb8 commit bab966f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions homeassistant/components/ambient_station/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,8 @@ def __init__(
@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):
Expand Down

0 comments on commit bab966f

Please sign in to comment.