From 9a8fc2e11ba2112d2efdf05cd8e678a331bb47cb Mon Sep 17 00:00:00 2001 From: Yves Racine Date: Tue, 11 Aug 2015 21:04:24 -0400 Subject: [PATCH] v1.1 added call to getCurrentUserInfo in poll() - to be executed once a day --- MyNeurio.devicetype.groovy | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/MyNeurio.devicetype.groovy b/MyNeurio.devicetype.groovy index c3f3a3d..21ea71c 100644 --- a/MyNeurio.devicetype.groovy +++ b/MyNeurio.devicetype.groovy @@ -4,7 +4,7 @@ * Copyright 2015 Yves Racine * linkedIn profile: ca.linkedin.com/pub/yves-racine-m-sc-a/0/406/4b/ * Refer to readme file for installation instructions. - * V1.0 + * V1.1 * * Code: https://github.com/yracine/device-type.myneurio * @@ -302,12 +302,15 @@ void poll() { generateEvent(dataEvents) String dateInLocalTime = new Date().format("yyyy-MM-dd", location.timeZone) - // generate the stats only once every day if (state.lastGeneratedDate != dateInLocalTime) { + + // refresh the sensor info once a day + getCurrentUserInfo() if (settings.trace) { log.debug "poll>about to generateSampleStats,dateInLocalTime=${dateInLocalTime},state.lastGeneratedDate= $state.lastGeneratedDate" } + // generate the stats only once every day generateSampleStats("") state.lastGeneratedDate= dateInLocalTime