Skip to content

Commit 16c2d20

Browse files
authored
change return lastdata in homecoach
1 parent 18271cf commit 16c2d20

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lnetatmo.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,10 +1028,7 @@ def lastData(self, hid=None, exclude=0):
10281028
# Define oldest acceptable sensor measure event
10291029
limit = (time.time() - exclude) if exclude else 0
10301030
ds = device['dashboard_data']['time_utc']
1031-
if device.get('time_utc',limit+10) > limit :
1032-
return {'When': ds, '_id': hid}
1033-
else:
1034-
return {'When': 0, 'id': hid}
1031+
return { '_id': hid, 'When': ds if device.get('time_utc',limit+10) > limit else 0}
10351032
else:
10361033
pass
10371034

0 commit comments

Comments
 (0)