mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Fix WAQI being zero (#97767)
This commit is contained in:
parent
d71f16c8b1
commit
3b48c8a0f5
@ -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