-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
the data pressure field is called pres, not press
| pres: float = field(metadata=base.metadata("atmospheric pressure", "hPa", "pressure")) |
__post_init__ should update pres, but instead it creates an attribute press
| self.press = (int(self.pres) << 8 | self.IAQ_acc) / 100 |
__format__ uses press instead of pres, which hides the error
PyPMS/src/pms/sensor/bosch_sensortec/mcu680.py
Lines 113 to 120 in 28644fc
| if spec == "atm": | |
| return f"{self.date:%F %T}: Temp. {self.temp:.1f} °C, Rel.Hum. {self.rhum:.1f} %, Press {self.press:.2f} hPa" | |
| if spec == "bme": | |
| return f"{self.date:%F %T}: Temp. {self.temp:.1f} °C, Rel.Hum. {self.rhum:.1f} %, Press {self.press:.2f} hPa, {self.gas:.1f} kΩ" | |
| if spec == "bsec": | |
| return f"{self.date:%F %T}: Temp. {self.temp:.1f} °C, Rel.Hum. {self.rhum:.1f} %, Press {self.press:.2f} hPa, {self.IAQ} IAQ" | |
| if spec == "csv": | |
| return f"{self.time}, {self.temp:.1f}, {self.rhum:.1f}, {self.press:.2f}, {self.IAQ_acc}, {self.IAQ}, {self.gas:.1f}, {self.alt}" |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working