diff --git a/homeassistant/components/waqi/sensor.py b/homeassistant/components/waqi/sensor.py index ae4e46c2a0b..71ec703df3f 100644 --- a/homeassistant/components/waqi/sensor.py +++ b/homeassistant/components/waqi/sensor.py @@ -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