Example #1
0
def crux(*args):
    if not isDoorWindowOrMotion(args[2]):
        return 1

    if args[1] != 'control':
        return 1

    current = getNotificationFromNodeById(args[2], args[3], args[1])
    previous = getNotificationFromNodeById(args[2], args[4], args[1])

    EmailAlertAlways(args[2], current, previous)
    return 0
Example #2
0
def crux(*args):
    if args[1] != 'battery':
        return 1

    current = getNotificationFromNodeById(args[2], args[3], args[1])

    ReportLowBatteryStatus(args[2], current)
    return 0
def crux(*args):
    if args[1] != 'battery':
        return 1

    current = getNotificationFromNodeById(args[2], args[3], args[1])

    ReportLowBatteryStatus(args[2], current)
    return 0