evanlifetv
Member
Hey all, say I want to use a function within a function, the help docs don't seem to cover this, I have been scratching my head trying to figure it out. I want to take
but I only wanted those to show after a certain time, say 9pm. I would need to determine the current time
Think of it as a "forgot to close the Garage Door reminder." (And its after dark, and you live in the wrong part of the city, better go make sure your lawn mower is still there.... you get the idea)
So, are nested functions allowed, because I seem to be hitting a wall with this one?
Code:
function onZoneNotReady(zone) {
if(zone.number == 4) {// Match zone by number
helper.sendNotification(controller, zone.bestDescription + ' Door Open / Not Ready!');
}
}
but I only wanted those to show after a certain time, say 9pm. I would need to determine the current time
Code:
function onSyncStart(forced, timestamp) {
var date = new Date(timestamp);
var sunsetDate = new Date(controller.sunsetDate);
if(date.getHours() >= 9 && date.getMinutes() >= 00) {
and
function onZoneNotReady(zone) {
if(zone.number == 4) {// Match zone by number
helper.sendNotification(controller, zone.bestDescription + ' Door Open / Not Ready!');
}
}
Think of it as a "forgot to close the Garage Door reminder." (And its after dark, and you live in the wrong part of the city, better go make sure your lawn mower is still there.... you get the idea)

So, are nested functions allowed, because I seem to be hitting a wall with this one?