diff --git a/apps/sleeplogalarm/lib.js b/apps/sleeplogalarm/lib.js index ea19d04e2..7701d2624 100644 --- a/apps/sleeplogalarm/lib.js +++ b/apps/sleeplogalarm/lib.js @@ -59,8 +59,8 @@ exports = { // insert sleeplogalarm conditions and function sleeplog.trigger.sleeplogalarm = { - from: settings.time - settings.earlier * 6E4, - to: settings.time - 1, + from: this.time - settings.earlier * 6E4, + to: this.time - 1, fn: function (data) { // execute trigger function if on light sleep or awake if (data.status === 3 || data.status === 2)