From d4ff72d8dc8775dec72f8cfbc6a17ee8d9a05d96 Mon Sep 17 00:00:00 2001 From: Matthew Wall Date: Thu, 27 Apr 2017 02:03:29 -0400 Subject: [PATCH] fixed interval bug in wmr200 driver --- bin/weewx/drivers/wmr200.py | 4 +++- docs/changes.txt | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/weewx/drivers/wmr200.py b/bin/weewx/drivers/wmr200.py index 80b9b8fc..071e547d 100644 --- a/bin/weewx/drivers/wmr200.py +++ b/bin/weewx/drivers/wmr200.py @@ -48,7 +48,7 @@ import weewx.drivers import weeutil.weeutil DRIVER_NAME = 'WMR200' -DRIVER_VERSION = "3.3.1" +DRIVER_VERSION = "3.3.2" def loader(config_dict, engine): # @UnusedVariable @@ -2047,6 +2047,8 @@ class WMR200(weewx.drivers.AbstractDevice): if newrec: newrec['dateTime'] = oldrec['dateTime'] newrec['usUnits'] = oldrec['usUnits'] + if 'interval' in oldrec: + newrec['interval'] = oldrec['interval'] return newrec return None diff --git a/docs/changes.txt b/docs/changes.txt index 0e5247f0..dadaf451 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -13,6 +13,9 @@ Added inDewpoint to the observation group dictionary. Added missing aggregation type 'min_ge'. Thanks to user Christopher McAvaney! +Fixed bug in wmr200 driver that resulted in archive records with no +interval field and 'NOT NULL constraint failed: archive.interval' errors. + 3.7.1 03/22/2017