Skip to content

Commit

Permalink
Fix device rounding
Browse files Browse the repository at this point in the history
  • Loading branch information
TimOrme committed Apr 24, 2023
1 parent c5e77ac commit 81909de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aqimon/read/novapm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 81909de

Please sign in to comment.