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