Airthings / airthings-ble

Library to control Airthings devices through BLE, primarily meant to be used in Home Assistant.
MIT License
21 stars 11 forks source link

Fix pressure max value #47

Closed LaStrada closed 2 weeks ago

LaStrada commented 3 weeks ago

This was reported here: https://github.com/home-assistant/core/issues/126976

When a device boots up, the value could be 65535 for a few seconds. This PR fixes this issue by validating the value and ignores everything above 1310. 65535 / 50 = 1310.7

We have the same logic for the other sensors as well.