New logic to calculate presence heartbeat interval