mirror of
https://github.com/bricebou/weewx-netatmo.git
synced 2025-01-18 12:01:11 +01:00
fix for lost sensor contact. thanks to users jkrasinger and bawe
This commit is contained in:
parent
cfd721636e
commit
ed38612d01
3 changed files with 8 additions and 2 deletions
|
@ -43,7 +43,7 @@ import weewx.wxformulas
|
|||
import weeutil.weeutil
|
||||
|
||||
DRIVER_NAME = 'netatmo'
|
||||
DRIVER_VERSION = "0.12"
|
||||
DRIVER_VERSION = "0.13"
|
||||
|
||||
INHG_PER_MBAR = 0.0295299830714
|
||||
MPH_TO_KPH = 1.60934
|
||||
|
@ -361,6 +361,9 @@ class CloudClient(Collector):
|
|||
def extract_data(x, units_dict):
|
||||
"""Extract data we care about from a device or module"""
|
||||
data = dict()
|
||||
# if contact with sensors is lost, then there will be no dashboard_data
|
||||
if 'dashboard_data' not in x:
|
||||
return data
|
||||
if 'time_utc' in x['dashboard_data']:
|
||||
data['time_utc'] = x['dashboard_data']['time_utc']
|
||||
for n in CloudClient.META_ITEMS:
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
0.13 20dec2018
|
||||
* deal with 'dashboard_data' not existing when lost contact with sensors
|
||||
|
||||
0.12 11sep2018
|
||||
* deal with missing time_utc from server
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ def loader():
|
|||
class NetatmoInstaller(ExtensionInstaller):
|
||||
def __init__(self):
|
||||
super(NetatmoInstaller, self).__init__(
|
||||
version="0.12",
|
||||
version="0.13",
|
||||
name='netatmo',
|
||||
description='Driver for netatmo weather stations.',
|
||||
author="Matthew Wall",
|
||||
|
|
Loading…
Reference in a new issue