From 81909de488d201d1d89a18f640d1a1d646881c20 Mon Sep 17 00:00:00 2001 From: Tim Orme Date: Sun, 23 Apr 2023 17:39:51 -0700 Subject: [PATCH] Fix device rounding --- aqimon/read/novapm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aqimon/read/novapm.py b/aqimon/read/novapm.py index 5fc6a87..c79f296 100644 --- a/aqimon/read/novapm.py +++ b/aqimon/read/novapm.py @@ -54,7 +54,7 @@ async def read(self) -> AqiRead: pm10_reads.append(result.pm10) self.reader.sleep() self.state = ReaderState(ReaderStatus.IDLE, None) - return AqiRead(pmtwofive=mean(pm25_reads), pmten=mean(pm10_reads)) + return AqiRead(pmtwofive=round(mean(pm25_reads), 2), pmten=round(mean(pm10_reads), 2)) except Exception as e: self.state = ReaderState(ReaderStatus.ERRORING, e) self.reader.sleep()