'Compute next time an update should occur.'

def get_next_interval(self, now=None):

    if (now is None):
        now = dt_util.utcnow()
    if (self.type == 'date'):
        now = dt_util.start_of_local_day(now)
        return (now + timedelta(seconds=86400))
    elif (self.type == 'beat'):
        interval = 86.4
    else:
        interval = 60
    timestamp = int(dt_util.as_timestamp(now))
    delta = (interval - (timestamp % interval))
    return (now + timedelta(seconds=delta))
