Skip to content

Commit 9a8fc2e

Browse files
committed
v1.1 added call to getCurrentUserInfo in poll() - to be executed once a day
1 parent d203496 commit 9a8fc2e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

MyNeurio.devicetype.groovy

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Copyright 2015 Yves Racine
55
* linkedIn profile: ca.linkedin.com/pub/yves-racine-m-sc-a/0/406/4b/
66
* Refer to readme file for installation instructions.
7-
* V1.0
7+
* V1.1
88
*
99
* Code: https://github.com/yracine/device-type.myneurio
1010
*
@@ -302,12 +302,15 @@ void poll() {
302302
generateEvent(dataEvents)
303303
String dateInLocalTime = new Date().format("yyyy-MM-dd", location.timeZone)
304304

305-
// generate the stats only once every day
306305

307306
if (state.lastGeneratedDate != dateInLocalTime) {
307+
308+
// refresh the sensor info once a day
309+
getCurrentUserInfo()
308310
if (settings.trace) {
309311
log.debug "poll>about to generateSampleStats,dateInLocalTime=${dateInLocalTime},state.lastGeneratedDate= $state.lastGeneratedDate"
310312
}
313+
// generate the stats only once every day
311314

312315
generateSampleStats("")
313316
state.lastGeneratedDate= dateInLocalTime

0 commit comments

Comments
 (0)