mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 06:47:09 +00:00
Fix unavailable when value is zero (#37918)
This commit is contained in:
parent
33dc015083
commit
baa7bb69b3
@ -555,7 +555,7 @@ class NetatmoPublicSensor(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."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user