Fixed co2 reading
This commit is contained in:
parent
cb50f230b6
commit
d3b2cc4c89
1 changed files with 2 additions and 2 deletions
|
@ -13,9 +13,9 @@ class Mhz19Co2:
|
||||||
return self.last_read
|
return self.last_read
|
||||||
|
|
||||||
def read(self) -> int | None:
|
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
|
return None
|
||||||
|
|
||||||
self.last_read = data["co2"]
|
self.last_read = data["co2"]
|
||||||
|
|
Loading…
Reference in a new issue