gjr80 / weewx-realtime_gauge-data

Near realtime support for updating of SteelSeries Weather Gauges by WeeWX
GNU General Public License v3.0
9 stars 5 forks source link

calc_trend function cannot handle a historical observation being None #11

Closed gjr80 closed 6 years ago

gjr80 commented 6 years ago

When calculating a trend value if the historical record obtained from the archive contains the observation field concerened and it's value is None then the code will fail with a TypeError. The fix is to expand an exisiting conditional check to detect the None value and return None.

This link refers.

gjr80 commented 6 years ago

Fixed vide commit https://github.com/gjr80/weewx-realtime_gauge-data/commit/5735591dd1ad8ecced6b2416cd4257aaa0ed6195