Fix zero value state rendering sensor unavailable (#34694)

Co-Authored-By: Franck Nijhof <git@frenck.dev>
This commit is contained in:
cgtobi 2020-04-25 22:15:31 +02:00 committed by GitHub
parent 8c5c963b96
commit d53cb951e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -223,7 +223,7 @@ class NetatmoSensor(Entity):
@property
def available(self):
"""Return True if entity is available."""
return bool(self._state)
return self._state is not None
def update(self):
"""Get the latest data from Netatmo API and updates the states."""