mirror of
https://github.com/home-assistant/core.git
synced 2025-08-07 06:35:10 +02:00
Fix WAQI being zero (#97767)
This commit is contained in:
committed by
GitHub
parent
2820514c33
commit
ecce601d3f
@@ -142,7 +142,7 @@ class WaqiSensor(SensorEntity):
|
|||||||
@property
|
@property
|
||||||
def native_value(self):
|
def native_value(self):
|
||||||
"""Return the state of the device."""
|
"""Return the state of the device."""
|
||||||
if value := self._data.get("aqi"):
|
if (value := self._data.get("aqi")) is not None:
|
||||||
with suppress(ValueError):
|
with suppress(ValueError):
|
||||||
return float(value)
|
return float(value)
|
||||||
return None
|
return None
|
||||||
|
Reference in New Issue
Block a user