diff --git a/src/handler/mhz19_co2.py b/src/handler/mhz19_co2.py index 5240780..925308b 100644 --- a/src/handler/mhz19_co2.py +++ b/src/handler/mhz19_co2.py @@ -13,9 +13,9 @@ class Mhz19Co2: return self.last_read def read(self) -> int | None: - data: dict | None = mh_z19.read() + data = mh_z19.read() - if not data or "co2" not in data.keys(): + if not data: return None self.last_read = data["co2"]