var garageDoorCheckTimer;
function onZoneNotReady(zone) {
if(zone.name == "Garage Door") {
garageDoorCheckTimer = setTimeout(function () {
helper.sendNotification(controller, zone.bestDescription + " was left open for 1 hour!");
// optionally you can reassign garageDoorCheckTimer to a new timeout here to remind again
}, 60*60*1000);
}
}
function onZoneSecure(zone) {
if(zone.name == "Garage Door") {
garageDoorCheckTimer.clearTimeout();
}
}
if(garageDoorCheckTimer != undefined) garageDoorCheckTimer.clearTimeout();
alert(zone.name);