From 3f083c0aed5874429ddafe6298315bc5c1b649e3 Mon Sep 17 00:00:00 2001 From: Maximilian Giller Date: Sat, 10 Aug 2024 02:44:33 +0200 Subject: [PATCH] Simplified co2 --- src/handler/mhz19_co2.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/handler/mhz19_co2.py b/src/handler/mhz19_co2.py index 4c3acdb..4ac99d7 100644 --- a/src/handler/mhz19_co2.py +++ b/src/handler/mhz19_co2.py @@ -13,11 +13,4 @@ class Mhz19Co2: return self.last_read def read(self) -> int | None: - data = mh_z19.read() - logging.debug(data["co2"]) - - if not data: - return None - - self.last_read = data["co2"] - return self.last_read + return mh_z19.read()["co2"]