HestiaPi / hestia-touch-openhab

OpenHAB2 files for HestiaPi Touch model
GNU General Public License v3.0
60 stars 17 forks source link

Hardware compatibility fix #72

Closed hestiahacker closed 1 year ago

hestiahacker commented 1 year ago

The previous value for barometric pressure will be NULL with some hardware (at least on Bullseye, the same hardware seemed to work just fine on Buster and earlier). This change added a try/catch around the code block that can sometimes fail and sets the value to zero in that case (which is the same as the code previously did if the value was NaN).

It's possible that the newer version of the OS has parseFloat() throw an error now where it previously returned NaN. I'm not really sure what changed, but I can confirm that this patch fixes the issue.