forked from home-assistant/core
Fix zero value state rendering sensor unavailable (#34694)
Co-Authored-By: Franck Nijhof <git@frenck.dev>
This commit is contained in:
@@ -223,7 +223,7 @@ class NetatmoSensor(Entity):
|
|||||||
@property
|
@property
|
||||||
def available(self):
|
def available(self):
|
||||||
"""Return True if entity is available."""
|
"""Return True if entity is available."""
|
||||||
return bool(self._state)
|
return self._state is not None
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
"""Get the latest data from Netatmo API and updates the states."""
|
"""Get the latest data from Netatmo API and updates the states."""
|
||||||
|
Reference in New Issue
Block a user